--:--









Quiz for Structure of a C++ program

Course: C++ Language | Subject: Unit 1 | Topic: Introduction to C++



Logo

Q1: What is the starting point of execution in a C++ program?

Logo

Q2: Which header file is necessary to perform input/output operations?

Logo

Q3: How do you include a header file in C++?

Logo

Q4: What is the correct syntax to print "Hello World" using C++?

Logo

Q5: Which namespace is commonly used to avoid prefixing std::?

Logo

Q6: Which symbol is used to end a statement in C++?

Logo

Q7: Which function type does the main() function have?

Logo

Q8: How do you write a single-line comment in C++?

Logo

Q9: What is the purpose of the return statement in main()?

Logo

Q10: Which of the following is the correct signature for main()?

Logo

Q11: What is the correct way to declare an integer variable named num?

Logo

Q12: What is the function of curly braces {} in a C++ program?

Logo

Q13: Which is the correct way to read input from the user?

Logo

Q14: What is the purpose of the preprocessor directive?

Logo

Q15: Which of the following is a valid C++ identifier?

Logo

Q16: Which of the following is NOT a valid variable type in C++?

Logo

Q17: How is the end of file indicated in standard input?

Logo

Q18: What is the output of this code snippet: cout << 5 + 3;

Logo

Q19: What does the directive "#include <iostream>" do?

Logo

Q20: Which of these statements declares a constant integer?

Are you ready to start test? Set your time limit