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 II
« Prev
Next »
Other IT Companies Interview Questions II
Find output of the following programs
Program 16 main() { int k=263,p=0; while(p<5) { putchar(k); p++; } } Program 17 main() { int a[10]={10,20,30}; printf("%d\n",*(a+*a+1-*a+3)); } Program 18 main() { char p[]="%d\n\n"; p[1]='c'; p[2]='d'; printf(p,65); printf("%cd\n",65); } Program 19 #include
#include
main() { char str1[]={'s','o','m','e'}; char str2[]={'s','o','m','e','\0'}; char *q,*p=str1; q=str2; while(strcmp(str1,str2)) printf("%s %s",str1,str2); p++; q++; printf("%s %s",p,q); } Program 20 #include
int show() { printf("i am in show function\n"); } int a() { printf("i am in a function\n"); } int b() { printf("i am in b function\n"); } main() { show(a(),b()); } Program 21 void fun(int n) { if(n>0) { fun(--n); printf("%d",n); fun(--n); } } main() { fun(3); } Program 22 void fun(int n) { if(n>0) { fun(--n); printf("%d",n); fun(n); } } main() { fun(2); } Program 23 main() { static int i=5; if(--i) { main(); printf("%d ",i); } } Program 24 main() { static int i=5; if(--i) { main(); printf("%d ",i); } i=i++; } Program 25 main() { int i=1; while(i<=100) { printf("%d\n",i); sleep(1); static int i=100; i++; printf("%d \n",i); //sleep(1); } } typedef struct xxx { char *s; struct xxx *p; }xx; main() { xx p; struct xxx c; c.p=&p; p.p=&c; p.s="krishna"; c.s="satyam"; printf("%s %s %s\n",p.p->s,c.p->s,p.p->p->s); } Program 26 typedef struct xxx { char *s; struct xxx *p; }; main() { struct xxx p; p.p=&p; p.p->s="Extreme C"; printf("%s %s %s\n",p.s,p.p->s,p.p->p->s); } Program 27 struct x { int a; }; struct y { char ch[2]; }; main() { struct y *p; struct x x1; x1.a=2; p=&x1; printf("%d %d\n",p->ch[0],p->ch[1]); } Program 27 main() { union a { int i; char c[2]; }; union a u; u.i=256; printf("%d %d %d\n",u.i,u.c[0]++,u.c[1]++); } Program 28 struct xxx { unsigned int a:3; unsigned int b:2; unsigned int c:3; }; main() { struct xxx p={54},*q; q=&p; printf("%d\n",q->a); printf("%d\n",q->b); printf("%d\n",q->c); } Program 29 #include
main() { struct { int a:1; }b; int i; b.a=1; i=b.a; printf("%d %i %x\n",i,i,i); } Program 30 main() { int i,*p; p=calloc(5,sizeof(int [5])); for(i=0;i<5;i++) printf("%d\n",i[p]); }
« 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