Motionzen
☰
×
◈ Introduction
◈ WIN-IT
◈ Smartplay Technologies
◈ TATA Power
◈ Sasken Technology
◈ MREC Tech
◈ RRSTB Consultancy
◈ Methode Electronics
◈ Hyundai Mobis
◈ Dexcel Electronices
◈ Data Patterns
◈ PROTECH
◈ VVDN - I
◈ VVDN - II
◈ VVDN - III
◈ UST Global - I
◈ UST Global - II
◈ UST Global - III
◈ Other Companies - I
◈ Other Companies - II
◈ Other Companies - III
Home
About
Consulting
Training
Tutorial
Interview Questions
Contact
Interview Questions
Other IT Companies Interview Questions
Home
Company Interview Experience
◈ Introduction
◈ WIN-IT
◈ Smartplay Technologies
◈ TATA Power
◈ Sasken Technology
◈ MREC Tech
◈ RRSTB Consultancy
◈ Methode Electronics
◈ Hyundai Mobis
◈ Dexcel Electronices
◈ Data Patterns
◈ PROTECH
◈ VVDN - I
◈ VVDN - II
◈ VVDN - III
◈ UST Global - I
◈ UST Global - II
◈ UST Global - III
◈ Other Companies - I
◈ Other Companies - II
◈ Other Companies - III
Interview Questions
Other IT Companies Interview Questions III
« Prev
Other IT Companies Interview Questions III
Find output of the following programs
Program 51 main() { long i=60000+5536; printf("%d->%d\n",i); } Program 52 main() { //int a=1; goto start; { int a=1; start:printf("%d\n",a); } } Program 53 main() { struct nm { int roll[5]; char name[10]; }nm; printf("%d\n",sizeof(nm)); } typedef struct bitfield { int a:3; char b:7; unsigned int c:12; }bit; main() { bit b1; printf("%d \n",sizeof(b1)); } Program 54 main() { //printf("%d %d \n",sizeof(NULL),sizeof("")); printf("%d %d \n",sizeof('\0'),sizeof("")); } Program 55 main() { char *s[]={"lakshya","cite","iter"}; char **p; p=s; printf("%s\n",*p); printf("%s\n",++*p); printf("%s\n",++*p); } Program 56 main() { enum e{red,green}; enum e ee=red; switch(ee) { case red:printf("red");break; case green:printf("green");break; } } Program 57 show() { printf("\nlakshya is the best"); return; } main() { int a; a=show(); printf("%d\n",a); } Program 58 main() { int x=15; while(x!=0) { printf("%x\n",x); x=x/2; } } Program 59 main() { while(!"") printf("hello\n"); } Program 60 main() { int x=-350u; char y=-145u; printf("%u\n",x+=y); } Program 61 main() { printf("Hello%cWorld\n",13); } Program 62 start(); end(); #pragma startup start #pragma startup end main() { printf("main"); } start() { printf("start"); } end() { printf("end"); } Program 63 #define FLOAT(x) 3.##x main() { printf("%f\n",FLOAT(14)); } Program 64 #include
main() { struct { int a; }ptr; (*ptr)->a=10; printf("%d\n",ptr.a); } Program 65 #include
main() { static int val=7; int data; if(--val) { data=main()+val; printf("%d ",data); } } Program 66 #include
void func(int ); main() { //func; func(4); } func() { printf("function\n"); } Program 67 void call(int); main() { call(3); } void call(int a) { if(a<6) call(++a); printf("%d ",a); } Program 68 main() { int a=10; ~a; printf("%d\n",a); } Program 69 main() { int i=1; while(i!=20) { i=i*i/i+1; // printf("%d\n",i*i/i+1); printf("%d\n",i); i+=2; } } Program 70 main() { int i=~0; i=i>>1; //i=i<<15; printf("%d\n",i); } Program 71 main() { int i=10; int *p=&i; *p=20; printf("%d\n",i); } Program 72 main() { int i=1; //int i=2; while(i!=20) { printf("%d\n",i*i/i+1); i+=2; sleep(1); } } Program 73 #include
#define f(a,b) a##b main() { printf("%d \n",f(3,4)); } Program 74 #include
/*htons(1)==256; so converted into int format is 1<<8 printf("%d\n",1<<8);*/ /*{ printf("%d",printf("%d",printf("%d",printf("%s","FAT PIPE")))); printf("\n"); }*/ main() { int x=0x1234; printf("%x\n",x<<8|x>>8); }
« Prev
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