main()

{

int i=0;

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

printf("%d",i);

}



main() { int i=0; for(;i++;printf("%d",i)) ; printf(&q..

Answer / susie

Answer :

1

Explanation:

before entering into the for loop the checking condition is
"evaluated". Here it evaluates to 0 (false) and comes out of
the loop, and i is incremented (note the semicolon after the
for loop).

Is This Answer Correct ?    25 Yes 9 No

Post New Answer

More C Code Interview Questions

main() { int c=- -2; printf("c=%d",c); }

1 Answers   TCS,


main() { show(); } void show() { printf("I'm the greatest"); }

2 Answers  


write a program for area of circumference of shapes

0 Answers  


to remove the repeated cahracter from the given caracter array. i.e.., if the input is SSAD output should of SAD

6 Answers   Synergy,


Write a c program to search an element in an array using recursion

1 Answers   Wipro,






main() { char *p = “ayqm”; printf(“%c”,++*(p++)); }

29 Answers   IBM, TCS, UGC NET, Wipro,


main() { int i=0; while(+(+i--)!=0) i-=i++; printf("%d",i); }

9 Answers   CSC, GoDB Tech, IBM,


#include<stdio.h> main() { register i=5; char j[]= "hello"; printf("%s %d",j,i); }

2 Answers  


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

1 Answers  


main() { if (!(1&&0)) { printf("OK I am done."); } else { printf("OK I am gone."); } } a. OK I am done b. OK I am gone c. compile error d. none of the above

3 Answers   HCL,


main() { float f=5,g=10; enum{i=10,j=20,k=50}; printf("%d\n",++k); printf("%f\n",f<<2); printf("%lf\n",f%g); printf("%lf\n",fmod(f,g)); }

1 Answers  


main() { char name[10],s[12]; scanf(" \"%[^\"]\"",s); } How scanf will execute?

2 Answers  


Categories