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


Please Help Members By Posting Answers For Below Questions

Is struct oop?

576


How can I do peek and poke in c?

616


write a program to concatenation the string using switch case?

1553


What happens if header file is included twice?

650


Why array is used in c?

549






What are volatile variables in c?

517


what is bit rate & baud rate? plz give wave forms

1512


What is use of #include in c?

590


What is wrong with this initialization?

585


What is the use of define in c?

592


Why static is used in c?

618


Write a program to reverse a given number in c language?

616


What is array in C

704


Is c weakly typed?

571


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)

1862