Welcome to your C Programming MCQ
2.
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?
3.
What is the correct way to initialize an array in C?
What is the correct way to initialize an array in C?
4.
What does the #include directive do in C?
What does the #include directive do in C?
5.
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?
7.
What is the output of printf("%d", sizeof(int)); in C?
What is the output of printf("%d", sizeof(int)); in C?
8.
How do you define a multi-dimensional array in C?
How do you define a multi-dimensional array in C?
9.
What is the purpose of the scanf() function in C?
What is the purpose of the scanf() function in C?
10.
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?
11.
How do you dynamically allocate memory in C?
How do you dynamically allocate memory in C?
13.
How do you define a constant in C?
How do you define a constant in C?
14.
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?
16.
How do you define a structure in C?
How do you define a structure in C?
20.
What is the purpose of calloc() function in C?
What is the purpose of calloc() function in C?
21.
How do you access the address of a variable in C?
How do you access the address of a variable in C?
22.
What is the purpose of typedef in C?
What is the purpose of typedef in C?
23.
What is the purpose of void in function declarations in C?
What is the purpose of void in function declarations in C?
25.
What does the strcmp() function do in C?
What does the strcmp() function do in C?
27.
What is the output of printf("%f", 3/2); in C?
What is the output of printf("%f", 3/2); in C?
28.
How do you declare an integer variable in C?
How do you declare an integer variable in C?
29.
How do you pass an array to a function in C?
How do you pass an array to a function in C?