
- Forum
- Programming Talk
- C and C++
- Difference Between Normal Executable Statement and Printf Statement
Difference Between Normal Executable Statement and Printf Statement
This is a discussion on Difference Between Normal Executable Statement and Printf Statement within the C and C++ forums, part of the Programming Talk category; What is the Difference Between Normal Executable Statement and Printf Statement? For example what the difference between i++ + ++i ...
-
11-19-2011, 06:04 AM #1
- Join Date
- Jan 2006
- Answers
- 16
Difference Between Normal Executable Statement and Printf Statement
What is the Difference Between Normal Executable Statement and Printf Statement?
For example what the difference between i++ + ++i in normal executable statement
z=i++ + ++i;
and printf statement
printf("%d",i++ + ++i);
-
02-21-2012, 06:13 AM #2
- Join Date
- Feb 2012
- Answers
- 66
In executable statements we always require a constant to output the values where as in printf the constants required for output are readily available.Printf also allows to display contents of several variables in formatted output and also to provide text labels.
In above example if i=2 then
z=i++ + ++i gives output as z=7
printf("%d",i++ + ++i); gives output 7

Reply With Quote





