C Interview Questions 81-90

This post contains 81-90 questions of c program. It will helpful to solve c aptitude questions, c quiz , c objective type questions etc in interview.81-90 QuestionsQ1: main() { static char names[5][20]={"pascal","ada","cobol","fortran","perl"}; int i; char *t; t=names[3]; names[3]=names[4]; names[4]=t; for (i=0;i<=4;i++) printf("%s",names[i]); } Answer: Compiler error: Lvalue required in function main Q2: #include main() { char s[]={'a','b','c','\n','c','\0'}; char *p,*str,*str1; p=&s[3]; str=p; str1=s; printf("%d",++*p + ++*str1-32); } Answer: M Q3: main( […]... Read More »

C Interview Questions 91-100

This post contains 91-100 questions of c program. It will helpful to solve c aptitude questions, c quiz , c objective type questions etc in interview.91-100 QuestionsQ1: main() { char *str1="abcd"; char str2[]="abcd"; printf("%d %d %d",sizeof(str1),sizeof(str2),sizeof("abcd")); } Answer: 2 5 5 Q2: main() { int *j; { int i=10; j=&i; } printf("%d",*j); } Answer: 10 Q3: void main() { int const * p=5; printf("%d",++(*p)); } Answer: Compiler error: Cannot modify […]... Read More »

C Interview Questions 101-110

This post contains 101-110 questions of c program. It will helpful to solve c aptitude questions, c quiz , c objective type questions etc in interview.101-110 QuestionsQ1: main() { char *p; printf("%d %d ",sizeof(*p),sizeof(p)); } Answer: 1 2 Q2: main() { char string[]="Hello World"; display(string); } void display(char *string) { printf("%s",string); } Answer: Compiler Error : Type mismatch in redeclaration of function display Q3: #include<stdio.h> main() { char s[]={'a','b','c','\n','c','\0'}; char […]... Read More »

C Interview Questions 111-120

This post contains 111-120 questions of c program. It will helpful to solve c aptitude questions, c quiz , c objective type questions etc in interview.111-120 QuestionsQ1: enum colors {BLACK,BLUE,GREEN} main() { printf("%d..%d..%d",BLACK,BLUE,GREEN); return(1); } Answer: 0..1..2 Q2: #include<stdio.h> main() { struct xx { int x=3; char name[]="hello"; }; struct xx *s=malloc(sizeof(struct xx)); printf("%d",s->x); printf("%s",s->name); } Answer: Compiler Error Q3: struct aaa{ struct aaa *prev; int i; struct aaa *next; […]... Read More »

C Interview Questions 121-130

This post contains 121-130 questions of c program. It will helpful to solve c aptitude questions, c quiz , c objective type questions etc in interview.121-130 QuestionsQ1: The size of structure and union is same when they contain a) single member b) any number of members c) a & b d) none Answer: Q2: The operator used to find the size of any variable a) sizeof b) Sizeof c) sizeOf […]... Read More »

C Interview Questions 131-140

This post contains 131-140 questions of c program. It will helpful to solve c aptitude questions, c quiz , c objective type questions etc in interview.131-140 QuestionsQ1: #define assert(cond) if(!(cond)) \ (fprintf(stderr, "assertion failed: %s, file %s, line %d \n",#cond,\ __FILE__,__LINE__), abort()) void main() { int i = 10; if(i==0) assert(i < 100); else printf("This statement becomes else for if in assert macro"); } Answer: No output Q2: What is […]... Read More »

C Interview Questions 141-150

This post contains 141-150 questions of c program. It will helpful to solve c aptitude questions, c quiz , c objective type questions etc in interview.141-150 QuestionsQ1: ferror function is used to find _________________ errors a) logical b) file opening c) data d) all the above Answer: Q2: The contents of the file are lost if it is opened in _______ mode a) a b) w c) w+ d) a+ […]... Read More »

C Interview Questions 151-160

This post contains 151-160 questions of c program. It will helpful to solve c aptitude questions, c quiz , c objective type questions etc in interview.151-160 QuestionsQ1: The prefix equivalent for the postfix ab+cd+* is a) a+b*c+d b) +ab*+cd c) *+ab+cd d) *++abcd Answer: Q2: The postfix equivalent for the prefix *++abcd is a) ab+c+d* b) abcd++* c) ab+cd+* d) ab+c*d+ Answer: Q3: The infix equivalent to the postfix expression […]... Read More »

C Interview Questions 161-170

This post contains 161-170 questions of c program. It will helpful to solve c aptitude questions, c quiz , c objective type questions etc in interview.161-170 QuestionsQ1: The nested loops are evaluated using a) stacks b) queues c) structures d) binary tree Answer: Q2: The data structure used in resource sharing systems is a) stacks b) queues c) arrays d) binary tree Answer: Q3: Which of the following is not […]... Read More »

C Interview Questions 171-180

This post contains 171-180 questions of c program. It will helpful to solve c aptitude questions, c quiz , c objective type questions etc in interview.171-180 QuestionsQ1: The number of edges in a minimum cost spanning tree of n nodes is a) n b) n+1 c) n-1 d) 2n Answer: Q2: Traveling sales man problem is an application of a) spanning trees b) binary tree c) greedy method d) divide […]... Read More »