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
Explain how to reverse singly link list.
What is the use of structure padding in c?
What is the explanation for the dangling pointer in c?
Explain b+ tree?
An application package has been provided to you without any documents for the following application. The application needs to be tested. How will you proceed?
What are the types of unary operators?
A float occupies 4 bytes in memory. How many bits are used to store exponent part? since we can have up to 38 number for exponent so 2 ki power 6 6, 6 bits will be used. If 6 bits are used why do not we have up to 64 numbers in exponent?
while loop contains parts a) initialisation, evalution of an expression,increment /decrement b) initialisation, increment/decrement c) condition evalution d) none of the above
Does sprintf put null character?
How is null defined in c?
Write a program of advanced Fibonacci series.
Write a program to reverse a given number in c language?
Wt are the Buses in C Language
Linked list is a Linear or non linear explain if linear how it working as a non linear data structures
Why are all header files not declared in every c program?