☰
×
Home
◈ Introduction
C - Data Types IQ
◈ C Data Type Tricky - I
◈ C Data Type Tricky - II
◈ C Data Type Tricky - III
◈ C Data Type Tricky - IV
◈ C Data Type Tricky - V
C - Operators IQ
◈ C Operators Tricky - I
◈ C Operators Tricky - II
◈ C Operators Tricky - III
Choose the Correct
◈ Choose the Correct Ans - I
◈ Choose the Correct Ans- II
◈ Choose the Correct Ans - III
◈ Choose the Correct Ans - IV
◈ Choose the Correct Ans - V
◈ Choose the Correct Ans - VI
Find Output - Tricky
◈ C Pgm Tricky Questions I
◈ C Pgm Tricky Questions II
◈ C Pgm Tricky Questions III
◈ C Pgm Tricky Questions IV
◈ C Pgm Tricky Questions V
◈ C Pgm Tricky Questions VI
◈ C Pgm Tricky Questions VII
◈ C Pgm Tricky Questions VIII
◈ C Pgm Tricky Questions IX
C - General IQ
◈ General C Questions I
◈ General C Questions II
◈ General C Questions III
◈ General C Questions IV
◈ General C Questions V
◈ General C Questions VI
◈ General C Questions VII
Home
About
Consulting
Training
Tutorial
Interview Questions
Contact
Interview Questions
C Tricky - Find Output
Home
C Interview Questions
◈ Introduction
C Data Types Tricky Questions
◈ C Data Type Tricky Questions I
◈ C Data Type Tricky Questions II
◈ C Data Type Tricky Questions III
◈ C Data Type Tricky Questions IV
◈ C Data Type Tricky Questions V
C Operators Interview Questions
◈ C Operators Tricky Questions I
◈ C Operators Tricky Questions II
◈ C Operators Tricky Questions III
Choose the Correct Answer
◈ Choose the Correct Answer I
◈ Choose the Correct Answer II
◈ Choose the Correct Answer III
◈ Choose the Correct Answer IV
◈ Choose the Correct Answer V
◈ Choose the Correct Answer VI
Find Output - Tricky C Program
◈ C Programs Tricky Questions I
◈ C Programs Tricky Questions II
◈ C Programs Tricky Questions III
◈ C Programs Tricky Questions IV
◈ C Programs Tricky Questions V
◈ C Programs Tricky Questions VI
◈ C Programs Tricky Questions VII
◈ C Programs Tricky Questions VIII
◈ C Programs Tricky Questions IX
General C Interview Questions
◈ General C Questions I
◈ General C Questions II
◈ General C Questions III
◈ General C Questions IV
◈ General C Questions V
◈ General C Questions VI
◈ General C Questions VII
C Programming Interview Questions
C Tricky Questions - Find Output VII
« Prev
Next »
C Tricky Questions - Find Output
Program 121 main() { int i; for(i=5;++i;i-=3) printf("%d\n",i); } Program 122 main() { void *vp=0; vp++; printf("%d\n",vp); } Program 123 main() { void ch='V'; printf("%c\n",ch); } Program 124 main() { char (*p)[100]; char *cp[100]; printf("%d %d\n",sizeof(p),sizeof(cp)); } Program 125 #include
struct node { int a; char b[]; }; Program 126 main() { struct node var; printf("%d\n",sizeof(var)); } Program 127 struct std { unsigned bit1:2; int bit2:2; unsigned bit3:5; }bit; main() { //struct std bit; bit.bit2=5; printf("%d\n",bit.bit2); } Program 128 struct std { int i; char ch; int j; }bit; main() { printf("%d\n",sizeof(bit)); } Program 129 #include
#define print(a) printf("%d %d\n",a++,++a); main() { int a=10; print(a++); //printf("2) %d\n",a); } Program 130 #include
main() { char c[]={'A','P','P','L','E'}; int *p=c; printf("%d\n",p); printf("%d\n",*p); p=c+1; printf("%d\n",p); printf("%d\n",*p); } Program 131 #include
main() { char c[]="apple"; printf("%s\n",c); } Program 132 main() { short int i=0; i=65536+300; printf("%hd\n",i); } Program 133 main() { char *str="hello"; char *str1="hai"; //printf("%s\n",strcpy(str,str1)); printf("%s\n",strcpy(str,"bye")); } Program 134 main() { switch(printf("hi")) { case 2:printf("nothing\n"); break; case 3:printf("some thing\n"); break; } } Program 135 main() { /*int i,a=10,b=1; i=printf("%d%d",a,b); printf("\n%d\n",i);*/ int i=1; printf("%d\n",sizeof(i++ + i)); } Program 136 main(int argc,char **argv) { printf("%d\n",argv[argc]+5); } Program 137 main() { //printf("%%%%\n"); /*int i=7; printf("%old %old %old\n",i++,i,++i);*/ int i; while(for(i=0;i<5;i++)) { printf("program\n"); } } Program 138 main() { /*char str[]="panterra \n\0"; //int s; //s=strlen(str); printf("%d %d\n",sizeof(str),strlen(str));*/ char *p="abc"; char *q="abc 123"; while(*p==*q) printf("%c %c\n",p++,q++); } Program 139 #include
int main() { register int i=10; int *p=&i; printf("%d\n",*p); } Program 140 #include
// extern int j; int main() { register int i; // i=10; // printf("%d\n",j); scanf("%d",&i); } // int j=10;
« Prev
Next »
Helpful Links
Sateeshkg Home
Interview Questions
Corporate Training
Recommended Books
Linux Consulting
Apply for Job Assistance
If you have any queries please email us at
info@motionzen.com