Sheet-1

A colorful and engaging digital illustration of a computer with C programming code on the screen, surrounded by symbols of programming like gears, light bulbs, and question marks.

C Programming Quiz

Test your knowledge of C programming with this engaging quiz! Whether you're a beginner wanting to learn the basics or an experienced programmer looking to refresh your skills, this quiz covers a variety of important topics related to C programming.

Key Features:

  • Multiple choice questions
  • Diverse topics including syntax, functions, and error handling
  • Instant scoring for immediate feedback
16 Questions4 MinutesCreated by CodingWizard42
Your Name?
What is required in each C program?
The program must have at least one function.
The program does not require any function.
Input data
Output data
If ((a > b) && (a <= c))  
        a = a + 1;  
else  
        c = c+1;  
A = 11, c = 10
A = 10, c = 10
A = 10, c = 11
A = 11, c = 11
int num = 58;
 
num % = 11;
5
8
3
11
b = s + b         
s = b - s              
b = b - s          
Exchange the values of s and b
Transfer the values of s and b
Add or subtract the values of s and b
Transfer the values of b and s
void main()
{ int k = 0;
for (k) printf("Hello"); }
Hello
Nothing
Varies
Compile time error
What will be the output of the following C code?
void main()
{ int k = 0;
for (k < 3; k++)
printf("Hello"); }
Hello is printed thrice
Compile time error
Nothing
Varies
What will be the output of the following C code?
void main()
{ double k = 0;
for (k = 0.0; k < 3.0; k++)
printf("Hello"); }
Run time error
Hello is printed thrice
Hello is printed twice
Hello is printed infinitely
What will be the output of the following C code?
int main()
{ int x = 1
if (x > 0)
printf("inside if\n")
else if (x > 0)
printf("inside elseif\n") }
Inside if
Inside else if
Both Printed
No Output
What will be the output of the following C code?
  1.     #include <stdio.h>
  2.     int main()
  3.     {
  4.         int x = 0;
  5.         if (x++)
  6.             printf("true\n");
  7.         else if (x == 1)
  8.             printf("false\n");
  9.     }
True
False
Error
Undefined variable

What will be the output of the following C code? (Assuming that we have entered the value 1 in the standard input)

  1.     #include <stdio.h>
  2.     void main()
  3.     {
  4.         int ch;
  5.         printf("enter a value between 1 to 2:");
  6.         scanf("%d", &ch);
  7.         switch (ch)
  8.         {
  9.            case 1:
  10.               printf("1\n");
  11.            default:
  12.               printf("2\n");}    }
1
2
1 2
Error

What will be the output of the following C code? (Assuming that we have entered the value 2 in the standard input)

  1.     #include <stdio.h>
  2.     void main()
  3.     {
  4.         int ch;
  5.         printf("enter a value between 1 to 2:");
  6.         scanf("%d", &ch);
  7.         switch (ch)
  8.         {
  9.            case 1:
  10.               printf("1\n");
  11.               break;
  12.               printf("hi");
  13.            default:
  14.               printf("2\n");}    }
1
Hi 2
Run time error
2

What will be the output of the following C code?

  1.     #include <stdio.h>
  2.     int main()
  3.     {
  4.         int I = 0, j = 0;
  5.         while (i < 5, j < 10)
  6.         {
  7.             i++;
  8.             j++;
  9.         }
  10.         printf("%d, %d\n", i, j);
  11.     }
5, 5
5, 10
10, 10
Syntax error

How many times I value is checked in the following C code?

  1.     #include <stdio.h>
  2.     int main()
  3.     {
  4.         int I = 0;
  5.         while (i < 3)
  6.             i++;
  7.         printf("In while loop\n");
  8.     }
2
4
3
1

What will be the output of the following C code?

  1.     #include <stdio.h>
  2.     int main()
  3.     {
  4.         int c = 2 ^ 3;
  5.         printf("%d\n", c);
  6.     }
8
1
9
0
{"name":"Sheet-1", "url":"https://www.quiz-maker.com/QPREVIEW","txt":"Test your knowledge of C programming with this engaging quiz! Whether you're a beginner wanting to learn the basics or an experienced programmer looking to refresh your skills, this quiz covers a variety of important topics related to C programming.Key Features:Multiple choice questionsDiverse topics including syntax, functions, and error handlingInstant scoring for immediate feedback","img":"https://cdn.poll-maker.com/104-5108884/img-qfi9bi6t2dxq2zyo6fpxektt.jpg"}
Powered by: Quiz Maker