C C — Learn

C programming language MCQ Questions Set 4

Review each question and reveal answers to strengthen your understanding

1 Which of the following statement is not true about preprocessor directives?
✅ Correct Answer: 4
2 Regarding the following statement which of the statements is true? const int a = 100;
✅ Correct Answer: 3
3 The difference between x and ‘x’ is?
✅ Correct Answer: 1
4 How to declare a wide character in the string literal?
✅ Correct Answer: 1
5 Which value can we not assign to reference?
✅ Correct Answer: 4
6 Identify the incorrect statement.
✅ Correct Answer: 2
7 Which reference modifier is used to define the reference variable?
✅ Correct Answer: 1
8 What does a reference provide?
✅ Correct Answer: 2
9 Identify the correct sentence regarding inequality between reference and pointer.
✅ Correct Answer: 1
10 What are the references in C++?
✅ Correct Answer: 1
11 What is the difference between references and pointers?
✅ Correct Answer: 1
12 Pick the correct statement about references in C++.
✅ Correct Answer: 2
13 Pick the correct statement about references.
✅ Correct Answer: 2
14  Which of the following operator is used while declaring references?
✅ Correct Answer: 2
15 Which of the following is incorrect?
✅ Correct Answer: 4
16 Which of the following function must use reference.
✅ Correct Answer: 2
17 How a reference is different from a pointer?
✅ Correct Answer: 4
18 Which of the following statement(s) is/are correct?
✅ Correct Answer: 4
19 The void pointer can point to which type of objects?
✅ Correct Answer: 4
20 When does the void pointer can be dereferenced?
✅ Correct Answer: 2
21 The pointer can point to any variable that is not declared with which of these?
✅ Correct Answer: 3
22 A void pointer cannot point to which of these?
✅ Correct Answer: 4
23  What we can’t do on a void pointer?
✅ Correct Answer: 1
24 The data elements in the structure are also known as what?
✅ Correct Answer: 2
25 What will be used when terminating a structure?
✅ Correct Answer: 3
26 What will happen when the structure is declared?
✅ Correct Answer: 1
27 The declaration of the structure is also called as?
✅ Correct Answer: 3
28 Which of the following is a properly defined structure?
✅ Correct Answer: 4
29 Which of the following accesses a variable in structure *b?
✅ Correct Answer: 1
30 Which function is used to check whether a character is an alphabet?
✅ Correct Answer: 1
31 Which function is used to check whether a character is a number?
✅ Correct Answer: 3
32 Which function is used to check whether a character is a tab or space?
✅ Correct Answer: 4
33 Which function is used to check whether a character is tab or space or whitespace control code( , ,etc.)?
✅ Correct Answer: 1
34 Which function is used to check whether a character is tab or a control code?
✅ Correct Answer: 3
35 Which function is used to check whether a character is printable on console?
✅ Correct Answer: 2
36 Which function is used to check whether a character is hexadecimal?
✅ Correct Answer: 1
37 Which function is used to check whether a character is punctuation mark?
✅ Correct Answer: 4
38 Which operator is having the right to left associativity in the following?
✅ Correct Answer: 4
39 Which operator is having the highest precedence?
✅ Correct Answer: 1
40 What is this operator called ?:?
✅ Correct Answer: 1
41 What is the use of dynamic_cast operator?
✅ Correct Answer: 1
42  The if..else statement can be replaced by which operator?
✅ Correct Answer: 2
43 The switch statement is also called as?
✅ Correct Answer: 2
44 Which looping process is best used when the number of iterations is known?
✅ Correct Answer: 1
45 Where does the execution of the program starts?
✅ Correct Answer: 2
46 What are mandatory parts in the function declaration?
✅ Correct Answer: 1
47 which of the following is used to terminate the function declaration?
✅ Correct Answer: 3
48 How many can max number of arguments present in function in the c99 compiler?
✅ Correct Answer: 4
49  Which is more effective while calling the functions?
✅ Correct Answer: 2
50 What is the scope of the variable declared in the user defined function?
✅ Correct Answer: 2
Back to All Quizzes