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
What does it mean when a pointer is used in an if statement?
explain what is fifo?
What do you mean by scope of a variable in c?
What is the difference between null pointer and wild pointer?
What is scanf_s in c?
Write a program to print factorial of given number using recursion?
What does %2f mean in c?
What does calloc stand for?
swap 2 numbers without using third variable?
Where does the name "C" come from, anyway?
Apart from dennis ritchie who the other person who contributed in design of c language.
What is struct node in c?
What are loops in c?
What is the difference between ++a and a++?
Explain what does it mean when a pointer is used in an if statement?