void main()
{
int i=5;
printf("%d",i++ + ++i);
}
Answer Posted / alan
when ever a cout or a printf statement is used..the instruction is processed from right to left..
had this been the qn
int i=5;
printf("%d%d",i++ + ++i,i);
ans would be 125.
as i said earlier the processing takes from right to left..
so first ++i=6,
then i++=6;
therfore 6+6=12..
| Is This Answer Correct ? | 16 Yes | 8 No |
Post New Answer View All Answers
Explain what are header files and explain what are its uses in c programming?
What is the hardest programming language?
Where in memory are my variables stored?
Is using exit() the same as using return?
I need testPalindrome and removeSpace
#include
Write a function which takes as parameters one regular expression(only ? and * are the special characters) and a string and returns whether the string matched the regular expression.
write a program to generate address labels using structures?
What does struct node * mean?
How do you use a 'Local Block'?
Do variables need to be initialized?
How can I recover the file name given an open stream?
Explain how does flowchart help in writing a program?
How do I swap bytes?
What are enums in c?
A routine usually part of the operation system that loads a program into memory prior to execution a) linker b) loader c) preprocessor d) compiler