void main()
{
int i=5;
printf("%d",i++ + ++i);
}
Answer Posted / alan
when ever a cout or a printf statement is used..the instruction is processed from right to left..
had this been the qn
int i=5;
printf("%d%d",i++ + ++i,i);
ans would be 125.
as i said earlier the processing takes from right to left..
so first ++i=6,
then i++=6;
therfore 6+6=12..
Is This Answer Correct ? | 16 Yes | 8 No |
Post New Answer View All Answers
Is struct oop?
How can I do peek and poke in c?
write a program to concatenation the string using switch case?
What happens if header file is included twice?
Why array is used in c?
What are volatile variables in c?
what is bit rate & baud rate? plz give wave forms
What is use of #include in c?
What is wrong with this initialization?
What is the use of define in c?
Why static is used in c?
Write a program to reverse a given number in c language?
What is array in C
Is c weakly typed?
Is there any algorithm to search a string in link list in the minimum time?(please do not suggest the usual method of traversing the link list)