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
VVDN - Interview Experience
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
VVDN - Interview Questions III
« Prev
Next »
VVDN - Interview Questions III
1. What is the sizeof "double" data type in 16-bit compiler? 2. Is "~value" is a valid variable name? 3. if(1/2) { } else { } . Which block will execute? 4. can we use negative numbers, float values, variables as case values in a switch-case statement ? 5. What is the format specifier used to print address of a variable? 6. If 'ptr' is a pointer , What is the C expression to increment address & value of variable ptr ? 7. Find the output of below program? #include
enum day {sunday, monday, tuesday, wednesday, thursday, friday, saturday}; int main() { thursday=10; enum day d = thursday; printf("%d\n",d); } 8. Find the output #include
int main() { int i=0; switch(i) { case '0' : printf("VVDN"); break; case '1' : printf("Technologies"); break; default : printf("VVDN Technogies"); } } 9. Find the Output #include
main() { int x=18; printf("%d\n",x<<1); printf("%d\n",x>>1); } 10. Find the output of program #include
main() { unsigned char a=9,b=11 ; printf("%d %d %d %d\n",a&b,a|b,a&&b,a||b); } 11. What is the size(in bytes) of an integer and character in 32-bit compiler ? 12. Find the output of program? #include
main() { int x=11; (x & 1) ? printf("Odd") : printf("Even"); } 13. Find the output of below program #include
main() { int arr[8]={10,20,30,40,50,60,70,80}; int *p1,*p2; p1=&arr[1]; p2=&arr[6]; printf("%d\n",(p2-p1)); } 14. Find the output of the program #include
main() { int a,b=2; a=-b--; printf("%d,%d\n",a,b); } main() { int i=1; switch (-i) { case -1 : printf("hello \n"); break; } } 15. Find the output #include
main() { switch(printf("HI\n")) { case 1 : printf("VOICE \n"); case 2 : printf("VIDEO \n"); case 3 : printf("DATA \n"); default : printf("NETORKING \n"); break; } } 16. Find the Output #include
main() { int array[2][3]={5,10,15,20,25,30}; int (*ptr)[2][3]=&array; printf("%d \n",***ptr); printf("%d\n",**(*ptr+1)); printf("%d\n",*(*(*ptr+1)+2)); } 17. Find the Output #include
#include
#define MAXROW 3 #define MAXCOL 4 main() { int (*p)[MAXCOL]; p=(int (*) [MAXCOL]) malloc(MAXROW * sizeof(*p)); return 0; } 18. Find the Output #include
main() { if( sizeof(char) >-1) { printf("inside if \n"); } else { printf("inside else \n"); } return 0; } 19. Write a declaration for X, where X is an array of 10 pointers to functions which return a pointer to an array of 5 characters. 20. Write a line of code in below program without assigning a=0; directly and without declaring any other local or global variables, so that output of below program becomes 5 0. #include
main() { int a=5; printf("%d\t",a); //write you code here printf("%d \n",a); } 20. What is the output of below program , assuming int size is 4 bytes #include
main() { char a[0]; int *b; b=a; printf("sizeof b[2] : %d \n",(int)sizeof(b[2])(int)); printf("sizeof a : %d \n",(int)sizeof(a)); printf("sizeof a[1]= : %d \n",(int)sizeof(a[1])); } 21. Find the Output #include
int a=4; main() { int a=20; { extern int a; printf(" a is : %d \n",a); } } 22. What is the output of below program, assuming int is 4 bytes, float is 4 bytes and no holes are padded by compiler. #include
typedef struct newtype { int a; float b; }newtype[2]; newtype var[4]; main() { printf("%d .. %d ..%d\n",(int)sizeof(newtype),(int)sizeof(struct newtype),(int)sizeof(var)); } 23. Find the Output #include
main() { printf(" %d \n",(-9)%(-1<<4)); } 24. Find the Output #include
#include
#include
main() { char *str="*hey*there*!"; int *ptr=calloc(1,20); strncpy((char*)(ptr),str,strlen(str)-1); printf("%s!!\n",(char*)(ptr+1)); free(ptr); } 25. What would be the output of below program when run on a Linux machine? #include
main() { char a=65; char b=((a<<1)>>2)<<1; char c=(a<<1); c=(c>>2)<<1; printf("a=%d b=%d c=%d\n",a,b,c); } 26. Find the Output #include
#include
main() { int i=0; printf("start\n"); if(close(!i)) printf("success\n"); else printf("failure \n"); printf("end\n"); } 27. Find the Output #include
main() { char ch1='A',ch2='B'; char* const ptr=&ch1; ptr=&ch1; printf("%c\n",*ptr); } 28. Find the Output #include
main() { char string1[20]="Hai I am here"; string1[5]=0; char string2[20]="Hai I am here"; string2[5]=0; char string3[20]="Hai I am here"; string3[5]=0; printf("%s\n",string1); printf("%s\n",string2); printf("%s\n",string3); } 29. Find the Output #include
main() { switch(1+"AB""CD"+1) { case 'A' : printf("pulp fiction \n"); break; case 'B' : printf("12 angry man \n"); break; case 'C' : printf("Casabance \n"); break; case 'D' : printf("Blood Diamond \n"); break; default : printf("Iron Man \n"); } } 30. Find the Output #include
struct temp { char a; char b; int c; }; main() { struct temp t; int y=(int)&t.c - (int)&t; printf("y=%d\n",y); } 31. Find the Output #include
main() { int a=1; while(a<=100); { printf("%d\n",a++); } } 32. Find the Output #include
struct { int foo : 4; }baz; int* example() { return &baz.foo; } main() { example(); printf("end\n"); } 33. Find the Output #include
extern int x; main() { printf("%d\n",x); x=10; } int x=11; 34. Find the Output #include
main() { int k=5; int *p=&k; int **m=&p; printf("%d %d %d\n",k,*p,**p); } 35. Find the Output #include
main() { int n=0x35; int i=0; for(i=1;i<3;i++) n<<1; printf("%d\n",n); } 36. Find the Output #include
main() { char *cards="JQK"; char a_card=cards[2]; cards[2]=cards[1]; cards[1]=cards[0]; cards[0]=cards[2]; cards[2]=cards[1]; cards[1]=a_card; puts(cards); } 37. Find the Output main() { char str[]="Geneius"; print (str); } print(char *s) { if(*s) print(s++); printf("%c",*s); }
« 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