void main()
{
int i=5;
printf("%d",i++ + ++i);
}
Answer Posted / poseidon
I might agree with ANS #1 because side effects are
involved..The expected answer might not be getting always
although in case of printf(), the arguments are evaluated
from RTL. For example consider the case
int i=10;
printf("%d %d %d %d",i++,--i,i--,--i);
Try some variations of these and and find out whether you
are able to get correctly or not..
In case the result depends on the compiler,for
verification,I will add what my compiler gave me
ANS:7 8 9 8
If anyone find out,pls reply.. Keen to know..
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is static and volatile in c?
What is the significance of an algorithm to C programming?
Explain 'far' and 'near' pointers in c.
Explain how does free() know explain how much memory to release?
console I/O functions means a) the I/O operations done on disk b) the I/O operations done in all parts c) the input given through keyboard is displayed VDU screen d) none of the above
Explain how do you list a file’s date and time?
What is a stream water?
write a program to print largest number of each row of a 2D array
How can I read a binary data file properly?
How can I sort more data than will fit in memory?
Draw a diagram showing how the operating system relates to users, application programs, and the computer hardware ?
What is integer constants?
Differentiate fundamental data types and derived data types in C.
What is action and transformation in spark?
What are multibyte characters?