void main()

{

int i=5;

printf("%d",i++ + ++i);

}

Answers were Sorted based on User's Feedback



void main() { int i=5; printf("%d",i++ + ++i); }..

Answer / purushotam111

Answer is 12

Is This Answer Correct ?    4 Yes 1 No

void main() { int i=5; printf("%d",i++ + ++i); }..

Answer / lucky varshney

answer is 11

Is This Answer Correct ?    1 Yes 2 No

void main() { int i=5; printf("%d",i++ + ++i); }..

Answer / susie

Answer :

Output Cannot be predicted exactly.

Explanation:

Side effects are involved in the evaluation of i

Is This Answer Correct ?    0 Yes 5 No

Post New Answer

More C Code Interview Questions

#include<conio.h> main() { int x,y=2,z,a; if(x=y%2) z=2; a=2; printf("%d %d ",z,x); }

1 Answers  


how to return a multiple value from a function?

2 Answers   Wipro,


Under linux environment can u please provide a c code for computing sum of series 1-2+3-4+5......n terms and -1+2-3+4-5...n terms..

2 Answers  


#include"math.h" void main() { printf("Hi everybody"); } if <stdio.h> will be included then this program will must compile, but as we know that when we include a header file in "" then any system defined function find its defination from all the directrives. So is this code of segment will compile? If no then why?

2 Answers  


What is the problem with the following code segment? while ((fgets(receiving array,50,file_ptr)) != EOF) ;

1 Answers  






Code for 1>"ascii to string" 2>"string to ascii"

1 Answers   Aricent, Global Logic,


main() { int *j; { int i=10; j=&i; } printf("%d",*j); }

9 Answers   HCL, Wipro,


main() { char *p; int *q; long *r; p=q=r=0; p++; q++; r++; printf("%p...%p...%p",p,q,r); }

1 Answers  


main() { void swap(); int x=10,y=8; swap(&x,&y); printf("x=%d y=%d",x,y); } void swap(int *a, int *b) { *a ^= *b, *b ^= *a, *a ^= *b; }

2 Answers  


What is your nationality?

1 Answers   GoDB Tech,


Write a program using one dimensional array to assign values and then display it on the screen. Use the formula a[i]=i*10 to assign value to an element.

1 Answers   Samar State University,


could you please send the program code for multiplying sparse matrix in c????

0 Answers  


Categories