Question 1: C++ Variable Declaration
What is the correct way to declare an integer variable named count in C++?
Question 2: C++ Arithmetic Operators
Which of the following is NOT an arithmetic operator in C++?
Question 3: C++ Pointer Declaration
Which of the following is the correct way to declare a pointer to an integer in C++?
Question 4: C++ If Statement
Which of the following is the correct syntax of an if statement in C++?
Question 5: C++ For Loop Syntax
Which of the following is the correct syntax of a for loop in C++?
Question 6: C++ File Stream Declaration
Which header file is required for file handling in C++?
Question 7: C++ Function Declaration
Which of the following is the correct way to declare a function in C++ that returns an integer and takes no arguments?
Question 8: C++ Array Declaration
Which of the following is the correct way to declare an integer array of size 5 in C++?
Question 9: C++ Class Declaration
Which is the correct way to declare a class in C++?
Question 10: C++ String Declaration
Which is the correct way to declare a string in C++ using the Standard Library?
Question 11: C++ Guess the Output - Integer Division
What will be the output of the following C++ code snippet?
Question 12: C++ Guess the Output – Modulus Operator
What will be the output of the following C++ code snippet?
Question 13: C++ Guess the Output – Dereferencing
What will this code print?
Question 14: C++ Guess the Output – Simple If
What will be the output of the following C++ code snippet?
Question 15: C++ Guess the Output – For Loop
What will be the output of the following C++ code snippet?
Question 16: C++ File Modes
Which mode is used to append data at the end of a file in C++?
Question 17: C++ Function Definition
What is the correct way to define a function named add that takes two integers and returns their sum?
Question 18: C++ Guess the Output – Array Initialization
What will be the output of the following code?
Question 19: C++ Guess the Output – Constructor
What will this program print?
Question 20: C++ Guess the Output – String Initialization
What will the following code print?