Question 1: C++ Boolean Data Type
What values can a bool data type hold in C++?
Question 2: C++ Logical Operators
Which of the following is the correct logical AND operator in C++?
Question 3: C++ Null Pointer
How can we assign a null value to a pointer in modern C++?
Question 4: C++ Else-If Ladder
Which statement is true about an else-if ladder in C++?
Question 5: C++ Do-While Loop
Which of the following differentiates a do-while loop from a while loop?
Question 6: C++ Guess the Output – Reading File
Suppose "data.txt" contains 1234. What will this program print?
Question 7: C++ Guess the Output – Pass by Value
What will be the output of the following code?
Question 8: C++ Size of Array
If we declare int arr[10]; then what is sizeof(arr) (assuming int takes 4 bytes)?
Question 9: C++ Inheritance
Which symbol is used to denote inheritance in C++?
Question 10: C++ Character Access
How can we access the 3rd character of a string s?
Question 11: C++ Guess the Output - Floating Point Precision
What will be the output of the following C++ code snippet?
Question 12: C++ Guess the Output – Logical NOT
What will be the output of the following C++ code snippet?
Question 13: C++ Guess the Output – Pointer Arithmetic
What will be the output of this program?
Question 14: C++ Guess the Output – Else If Ladder
What will be the output of the following C++ code snippet?
Question 15: C++ Guess the Output – Do-While Loop
What will be the output of the following C++ code snippet?
Question 16: C++ File Opening Multiple Modes
Which of the following opens a file for both reading and writing?
Question 17: C++ Pass by Reference
Which of the following correctly demonstrates pass by reference in C++?
Question 18: C++ Guess the Output – Array Traversal
What will be the output of the following code?
Question 19: C++ Guess the Output – Function Overloading
What will this program print?
Question 20: C++ Guess the Output – String Substring
What will the following code print?