☰
×
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 Pgm - Choose the Correct Ans
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 - Choose the Correct Answer II
« Prev
Next »
C Program - Choose the Correct Answer
11. What is the output of below program #include
void main(void) { char a[5]; a[0]='q'; a[1]='u'; a[2]='e'; printf("%s",a); } Options a) q b) que c) garbage d) None of these 12. Choose the correct answer. #include
void main() { static int a=2,b=4,c=8; static char *arr1[2]={&a,&b}; static char *arr2[2]={&b,&c}; int* (*arr[2])[2]={&arr1,&arr2}; printf("%d %d\t",*(*arr[0])[1],*(*(**(arr+1)+1))); } Options a) 2 4 b) 2 8 c) 4 2 d) 4 8 13. Which of the following statement is correct? a) a reference is stored on "heap". b) a reference is stored on "stack". c) a reference is stored in "a queue". d) a reference is stored in "binary tree". 14. Choose the correct answer #include
int main() { int ary[4]={1,2,3,4}; int *p=ary+3; printf("%d %d\n",p[-2],ary[*p]); } Options a) 2 3 b) compile time error c) 2 4 d) 2 garbage_value 15. From the following c Program, choose the correct answere #include
#define swap(a,b) {\ int temp;\ temp=a;\ a=b;\ b=temp;\ } int main(int argc,char *argv[]) { int a=3,b=2; if(a>b) { swap(a,b); } else { b=a; } printf("a=%d b=%d\n",a,b); return 0; } Options a) 2 3 b) 3 3 c) 3 2 d) syntax error while declaration 16. Choose the Correct Answer #include
int i=10; main() { static int i=5; printf("%d\n",i); } Options a) 10 b) 5 c) compile time error d) garbage value 17. A computer program that converts the whole program into machine language line by line is called? a) Interpreter b) Compiler c) Translator d) all the above 18. Find the Output of C Program? #include
void main() { int array[10]; int *i=&array[2],*j=&array[5]; int diff=j-i; printf("%d\n",diff); } Options a) 3 b) 6 c) garbage value d) error 19. Choose the correct answer. #include
int *f(); int main() { int *p=f(); printf("%d\n",*p); } int* f() { int *j=(int*)malloc(sizeof(int)); *j=10; return j; } Options a) Compile time error b) 10 c) Segmentation fault/runtime crash since pointer to local variable is returned d) Undefined behavior 20. Choose the Correct answer of the following C Program? #include
void main() { unsigned int x=0x1234abcd; x=(x<<4 | x>>4); printf("%x\n",x); } Options a) 2143BADC b) 0234ABCD c) 2043BAD0 d) 236BFEFC
« 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