void main()
{
int i=5;
printf("%d",i++ + ++i);
}
Answer Posted / vivers
There are two different questions..
in which its asking the result for
1)(i++ + ++i)
answer will be---> 12
"as addition will takes place from left to right
step1: i++ = 5;
step2: value of i will be updated before taking value of
another operand and hence i = 6;
step3: ++i = 7 as first increment will happen and then value
will be used.
final result: 5 + 7 = 12"
2) (i+++++i)
answer will be---> compile error
"because illegal combination of operators"
best of luck...
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
Why cant I open a file by its explicit path?
What is the return type of sizeof?
What are the differences between Structures and Arrays?
hw can we delete an internal node of binary search tree the internal node has child node..plz write progarm
can we implement multi-threads in c.
What type of function is main ()?
What's the difference between constant char *p and char * constant p?
Define C in your own Language.
Combinations of fibanocci prime series
What is use of bit field?
Why does not c have an exponentiation operator?
What does *p++ do? What does it point to?
Differentiate Source Codes from Object Codes
Why do we use null pointer?
what is the difference between 123 and 0123 in c?