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

#ifdef something int some=0; #endif main() { int thing = 0; printf("%d %d\n", some ,thing); }

1 Answers  


Find your day from your DOB?

15 Answers   Accenture, Microsoft,


main() { char s[ ]="man"; int i; for(i=0;s[ i ];i++) printf("\n%c%c%c%c",s[ i ],*(s+i),*(i+s),i[s]); }

1 Answers   DCE,


main() { int a=2,*f1,*f2; f1=f2=&a; *f2+=*f2+=a+=2.5; printf("\n%d %d %d",a,*f1,*f2); }

6 Answers  


Finding a number multiplication of 8 with out using arithmetic operator

8 Answers   Eyeball, NetApp,






struct Foo { char *pName; }; main() { struct Foo *obj = malloc(sizeof(struct Foo)); clrscr(); strcpy(obj->pName,"Your Name"); printf("%s", obj->pName); } a. Your Name b. compile error c. Name d. Runtime error

3 Answers   HCL,


write a c program to input initial & final time in the format hh:mm and find the time intervel between them? Ex inputs are initial 06:30 final 00:05 and 23:22 final 22.30

0 Answers  


How can i find first 5 natural Numbers without using any loop in c language????????

2 Answers   Microsoft,


main(){ unsigned int i; for(i=1;i>-2;i--) printf("c aptitude"); }

2 Answers  


hello sir,is there any function in C that can calculate number of digits in an int type variable,suppose:int a=123; 3 digits in a.what ll b answer?

6 Answers  


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

1 Answers  


main() { char *p; p="Hello"; printf("%c\n",*&*p); }

1 Answers  


Categories