Shehryar Aziz
Shehryar Aziz asked:

Program 3.5 Displaying Multiple Values #include int main (void) { int value1, value2, sum; value1 = 50; value2 = 25; sum = value1 + value2; printf ("The sum of %i and %i is %i\n", value1, value2, sum); return 0; } I am reading this book, strange thing i found here, the author is using %i .. How can we expect the results here? We should use %d with integers..

To answer questions about Programming in C, please sign up.
Ikkhon Chowdhury %d and %i gives the same result. The author uses %i throughout the entire book(what he clearly mentioned at the beginning of the book).
Image for Programming in C
Rate this book
Clear rating

About Goodreads Q&A

Ask and answer questions about books!

You can pose questions to the Goodreads community with Reader Q&A, or ask your favorite author a question with Ask the Author.

See Featured Authors Answering Questions

Learn more