Skip to content

Category Archives: C Quiz

In the context of “break” and “continue” statements in C, pick the best statement. (A) “break” can be used in “for”, “while” and “do-while” loop… Read More
Choose the best statement with respect to following three program snippets. <br> /*Program Snippet 1 with for loop*/<br> for (i = 0; i < 10;… Read More
Which of the following statement is correct for switch controlling expression? (A) Only int can be used in “switch” control expression. (B) Both int and… Read More
What’s going to happen when we compile and run the following C program? #include < stdio.h ><br> int main()<br> {<br>  int j = 0;<br>  for… Read More
What’s going to happen when we compile and run the following C program? #include < stdio.h ><br> <br> int main()<br> {<br>   int i = 1,… Read More
With respect to following “for” loops in C, pick the best statement. Assume that there is a prior declaration of ‘i’ in all cases for… Read More
With respect to following “for” loops in C, pick the best statement Assume that there is a prior declaration of ‘i’ in all cases for… Read More
As per C language standard, which of the followings is/are not keyword(s)? Pick the best statement. auto make main sizeof elseif (A) None of the… Read More
Which of the following functions from “stdio.h” can be used in place of printf()? (A) fputs() with FILE stream as stdout. (B) fprintf() with FILE… Read More
What’s going to happen when we compile and run the following C program snippet? #include "stdio.h" int main() {  int a = 10;     printf("=%d… Read More
What’s going to happen when we compile and run the following C program snippet? #include "stdio.h" int main() {  int a = 10;  int b… Read More
For a given integer, which of the following operators can be used to “set” and “reset” a particular bit respectively? (A) | and & (B)… Read More
In the context of the below program snippet, pick the best answer. #include "stdio.h" int arr[10][10][10]; int main() {  arr[5][5][5] = 123;  return 0; }… Read More
In the context of modulo operation (i.e. remainder on division) for floating point (say 2.1 and 1.1), pick the best statement. (A) For floating point,… Read More
Suppose a C program has floating constant 1.414, what’s the best way to convert this as “float” data type? (A) (float)1.414 (B) float(1.414) (C) 1.414f… Read More

Start Your Coding Journey Now!