void main()
{
int i=5;
printf("%d",i++ + ++i);
}
Answer Posted / ravinder
Ans 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;
| Is This Answer Correct ? | 24 Yes | 8 No |
Post New Answer View All Answers
Write a program to print factorial of given number using recursion?
What are the valid places to have keyword “break”?
swap 2 numbers without using third variable?
What is the use of pragma in embedded c?
Write a code of a general series where the next element is the sum of last k terms.
Write a program to check prime number in c programming?
How can I make it pause before closing the program output window?
what will be maximum number of comparisons when number of elements are given?
What is oops c?
the maximum length of a character constant can be a) 1 character b) 8 characters c) 256 chaacters d) 125 characters
What is static memory allocation? Explain
What is the use of function overloading in C?
Place the #include statement must be written in the program?
How can I change their mode to binary?
What are the features of c language?