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 is use of bit field?
How do you define structure?
What is the difference between exit() and _exit() function?
What are conditional operators in C?
Why main is used in c?
What is switch in c?
Explain how can I convert a string to a number?
Explain what is the difference between functions abs() and fabs()?
How to check whether string is a palindrome, WITHOUT USING STRING FUNCTIONS?
Explain a pre-processor and its advantages.
c language supports bitwise operations, why a) 'c' language is system oriented b) 'c' language is problem oriented c) 'c' language is middle level language d) all the above
Explain what are compound statements?
Why doesnt that code work?
What is return in c programming?
What is operator promotion?