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

What is #line?

600


What are pointers? What are different types of pointers?

617


Synonymous with pointer array a) character array b) ragged array c) multiple array d) none

605


Write a program to reverse a linked list in c.

632


What is keyword in c?

586






What is 1d array in c?

590


Differentiate between a for loop and a while loop? What are it uses?

658


What is pre-emptive data structure and explain it with example?

3199


what are the program that using a two dimensional array that list the odd numbers and even numbers separately in a given 10 inputs values

1253


a) Identify the following declarations. Ex. int i (integer variable) float a[l0](array of 10 real nos) int (*f())() void *f int (*f()) [] void *f int f[] [] [] char *(*f) () int (*f[]) [] float(*f) [] [] float **f int ******f

1577


Is it possible to initialize a variable at the time it was declared?

745


Why isnt there a numbered, multi-level break statement to break out

578


What is difference between scanf and gets?

602


Here is a good puzzle: how do you write a program which produces its own source code as output?

590


Can a function argument have default value?

656