main()
{ int i=5;
printf("%d",++i + i);
} output is 10
------------------------
main()
{ int i=5;
printf("%d",i++ + i);
}output is 12
why it is so? give appropiate reason....
Answer Posted / ashi smita
in first program i is post increment than i=5 and i=5+5=10
than i is increment by 1 and the value of i is 6 but second
program first i is preincrement by 1 and the value of is 6
than sum of i is 12.
Is This Answer Correct ? | 3 Yes | 10 No |
Post New Answer View All Answers
what do u mean by Direct access files? then can u explain about Direct Access Files?
"%u" unsigned integer print the a) address of variable b) value of variable c) name of a variable d) none of the above
Why do we need volatile in c?
What is spaghetti programming?
What is the mean of function?
What is the use of #include in c?
What are the advantages of the functions?
What are the types of c language?
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
write a c program thal will find all sequences of length N that produce the sum is Zero, print all possible solutions?
What are variables and it what way is it different from constants?
What is an array in c?
What is static and volatile in c?
What are pragmas and what are they good for?
How many header files are in c?