void main()
{
int i=5;
printf("%d",i+++++i);
}
Answer Posted / visu
i+++++i=i++ + ++i
remember this expression is nothing but adding two i's
now unary operators hav higher precedence than binary
=>++ executes first
so i++ =5 (since value changes after statement)
and ++i makes it i=6
as i said its jus adding to i's
now ans=i+i=6+6=12
| Is This Answer Correct ? | 15 Yes | 5 No |
Post New Answer View All Answers
Can a program have two main functions?
What is n in c?
Where are some collections of useful code fragments and examples?
In C, What is the #line used for?
Explain how do you print an address?
Write the program that calculates and prints the average of several integers. Assume that the last value read is sentinel 9999.
Why is it usually a bad idea to use gets()? Suggest a workaround.
Can include files be nested?
What is sizeof array in c?
#include main() { enum _tag{ left=10, right, front=100, back}; printf("left is %d, right is %d, front is %d, back is %d",left,right,front,back); }
What does main () mean in c?
What are types of functions?
What is the role of this pointer?
Give me the code of in-order recursive and non-recursive.
What are void pointers in c?