Welcome to your C Programming MCQ
2.
What is the purpose of the break statement in a switch statement in C?
What is the purpose of the break statement in a switch statement in C?
4.
How do you define a constant in C?
How do you define a constant in C?
6.
How do you dynamically allocate memory in C?
How do you dynamically allocate memory in C?
7.
What is the purpose of calloc() function in C?
What is the purpose of calloc() function in C?
9.
What is the output of printf("%f", 3/2); in C?
What is the output of printf("%f", 3/2); in C?
10.
What is the correct way to initialize an array in C?
What is the correct way to initialize an array in C?
13.
What is the purpose of the scanf() function in C?
What is the purpose of the scanf() function in C?
14.
What is the purpose of void in function declarations in C?
What is the purpose of void in function declarations in C?
15.
How do you access the address of a variable in C?
How do you access the address of a variable in C?
16.
What does the strcmp() function do in C?
What does the strcmp() function do in C?
17.
What is the output of printf("%d", sizeof(int)); in C?
What is the output of printf("%d", sizeof(int)); in C?
18.
What does the #include directive do in C?
What does the #include directive do in C?
20.
How do you declare an integer variable in C?
How do you declare an integer variable in C?
21.
How do you define a multi-dimensional array in C?
How do you define a multi-dimensional array in C?
22.
How do you access the third element of an array arr in C?
How do you access the third element of an array arr in C?
23.
What is the purpose of typedef in C?
What is the purpose of typedef in C?
24.
How do you open a file named data.txt for writing in C?
How do you open a file named data.txt for writing in C?
27.
How do you define a structure in C?
How do you define a structure in C?
28.
How do you write a for loop in C that iterates 5 times?
How do you write a for loop in C that iterates 5 times?
30.
How do you pass an array to a function in C?
How do you pass an array to a function in C?