Advertisement
Advertisement
C Quizzes, Questions & Answers
Recent C Quizzes
Questions: 21 | Attempts: 374 | Last updated: Mar 21, 2025
-
Sample QuestionWhat will be output if you will compile and execute the following c code? #include<stdio.h> struct marks{ int p:3; int c:3; int m:2; }; int main(){ struct marks s={2,-6,5}; printf("%d %d %d",s.p,s.c,s.m); return 0; }
Questions: 20 | Attempts: 107 | Last updated: Feb 17, 2025
-
Sample QuestionWhat is the output? main() { char val[] = {‘a’,’b’,’c’,’\n’,’c’,’\0’}; char *p, *val1, *val2; p = &val[3]; val1 = val; val2 = val; printf(“%d”, ++*p + ++*val1 – 32); }
Questions: 20 | Attempts: 294 | Last updated: Feb 17, 2025
-
Sample QuestionWhich of the following is a keyword used for a storage class?
Questions: 30 | Attempts: 320 | Last updated: Mar 22, 2025
-
Sample QuestionThe return-type of “printf” is:
Questions: 20 | Attempts: 1313 | Last updated: Mar 16, 2025
-
Sample QuestionWhich of the following is not a valid variable name declaration?
Questions: 30 | Attempts: 449 | Last updated: Mar 18, 2025
-
Sample QuestionWhat will happen if the below program is executed? #include int main() { int main =3; printf("%d", main); return 0; }
Questions: 10 | Attempts: 967 | Last updated: Mar 21, 2025
-
Sample QuestionWhat is the value of z after executing this sequence (check indentation)? int x = 100, y = 50, z = -1; if ( x + y > 50) if ( x + y < 100) z = 0; else z = 1;
Questions: 10 | Attempts: 262 | Last updated: Mar 17, 2025
-
Sample QuestionC++ first appeared in which year?
Questions: 50 | Attempts: 1079 | Last updated: Feb 6, 2025
-
Sample QuestionWhat will be the output of the program? #include #include int main() { float n=1.54; printf("%f, %f\n", ceil(n), floor(n)); return 0; }
Questions: 50 | Attempts: 1595 | Last updated: Mar 21, 2025
-
Sample QuestionPoint out the correct statements are correct about the program below? #include int main() { char ch; while(x=0;x<=255;x++) printf("ASCII value of %d character %c\n", x, x); return 0; }
Advertisement