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
What are pointers?
Write a program of prime number using recursion.
Are the variables argc and argv are always local to main?
pgm to find any error in linklist(in single linklist check whether any node points any of previous nodes instead of next node)
Can you explain the four storage classes in C?
What is static volatile in c?
What are header files and what are its uses in C programming?
Give basis knowledge of web designing ...
Explain what is dynamic data structure?
Explain how can I read and write comma-delimited text?
hi to every one .. how to view table pool after creating the pooled table? plz help me.. if any knows abt this ..
What is the heap in c?
What is the difference between malloc calloc and realloc in c?
main() { int i = 10; printf(" %d %d %d ", ++i, i++, ++i); }
which of the following is not a character constant a) 'thank you' b) 'enter values of p, n ,r' c) '23.56E-o3' d) all of the above