main()
{
int i = 10;
printf(" %d %d %d \n", ++i, i++, ++i);
}

Answer Posted / krityangan

The Answer is 13 11 13
because the post increment will printed first and then pre.
i=10
the ++i=11,i++=12,++i=13,but in c the compiler will print ++p which is now 13 and after that when the compiler come to i++ it will print 11 because in the pre addition the previous vale is printed first andthan i= 12.

Is This Answer Correct ?    27 Yes 11 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the salient features of c languages?

830


What are the valid places to have keyword “break”?

805


find the sum of two matrices and WAP for it.

867


Why is c platform dependent?

782


What is merge sort in c?

808






GIven a sequence of characters. How will you convert the lower case characters to upper case characters. ( Try using bit vector - sol given in the C lib -> typec.h)

844


Why do we use header files in c?

777


what is the differnce between programing langauge and tool? is sas is a programing langauge r tool?

2081


Explain the difference between malloc() and calloc() function?

778


What does != Mean in c?

772


What are run-time errors?

787


What are the differences between new and malloc in C?

788


What library is sizeof in c?

771


what is the structure pointer?

1825


Explain how can you determine the size of an allocated portion of memory?

803