what is the output for this question:
main()
{
int i=1;
printf("%d%d%d",i,i++,++i);
}
Answer Posted / sumalatha
Ans is 2 2 2
because in printf assosiativity is from left to right
first pre increments i that becomes 2 next post increment
is done after printf stmt so prints 2 again, then simple
print i i.e 2again
last post increnent which i becomes 3 but that is done
after printf stmt
Is This Answer Correct ? | 1 Yes | 4 No |
Post New Answer View All Answers
What are identifiers c?
How do you sort filenames in a directory?
I need previous papers of CSC.......plz help out by posting them.......
What is main return c?
hi, which software companys will take,if d candidate's % is jst 55%?
What would happen to X in this expression: X += 15; (assuming the value of X is 5)
What is array of structure in c?
what do you mean by enumeration constant?
What is LINKED LIST? How can you access the last element in a linked list?
What are the different types of constants?
In C language, the variables NAME, name, and Name are all the same. TRUE or FALSE?
What are the types of i/o functions?
What is the advantage of c?
Explain what will be the outcome of the following conditional statement if the value of variable s is 10?
What is the difference between printf and scanf in c?