Skip to content

Category Archives: C Quiz

Anyone of the followings can be used to declare a node for a singly linked list. If we use the first declaration, “struct node *… Read More
In the below statement, ptr1 and ptr2 are uninitialized pointers to int i.e. they are pointing to some random address that may or may not… Read More
For the following declaration of a function in C, pick the best statement int [] fun(void (*fptr)(int *)); (A) It will result in compile error.… Read More
Pick the correct statement for const and volatile. (A) const is the opposite of volatile and vice versa. (B) const and volatile can’t be used… Read More
In a C program snippet, followings are used for definition of Integer variables? signed s; unsigned u; long l; long long ll; Pick the best… Read More
Which of the followings is correct for a function definition along with storage-class specifier in C language? (A) int fun(auto int arg) (B) int fun(static… Read More
Suppose a, b, c and d are int variables. For ternary operator in C ( ? : ), pick the best statement. (A) a>b ?… Read More
For the following “typedef” in C, pick the best statement typedef int INT, *INTPTR, ONEDARR[10], TWODARR[10][10]; (A) It will cause compile error because typedef is… Read More
“typedef” in C basically works as an alias. Which of the following is correct for “typedef”? (A) typedef can be used to alias compound data… Read More
In a C program, following variables are defined: float      x = 2.17; double   y = 2.17; long double z = 2.17; Which of the following… Read More
What’s the meaning of following declaration in C language? int (*p)[5]; (A) It will result in compile error because there shouldn’t be any parenthesis i.e.… Read More
Assuming int size is 4 bytes, what is going to happen when we compile and run the following program? #include “stdio.h” int main() {   printf(“GeeksQuiz\n”);… Read More
Which of the following is correct with respect to “Jump Statements” in C? (A) goto (B) continue (C) break (D) return (E) All of the… Read More
A typical “switch” body looks as follows: <br> switch (controlling_expression)<br> {<br>   case label1:<br>     /*label1 statements*/<br>     break;<br>   case label2:<br>     /*label1 statements*/<br>     break;<br>   default:<br>     /*Default statements*/<br> }<br>… Read More
What would happen when we compile and run this program? <br> #include < stdio.h ><br> int main()<br> {<br>   int i; <br>   goto LOOP;<br>   for (i… Read More

Start Your Coding Journey Now!