Computer Science Quizzes

Home: Computer Science MCQs

Q. The file type #include is called
(A) syntax
(B) operator
(C) header file
(D) string constant

The answer is: (C) header file ☑

Q. Consider the main body of a C++ program,
string var1 = “Computer “;
string var2 = “Science”;
string var3 = var1 + var2;
cout << “var3” << endl;
If the program is run, what will be displayed on the screen?
(A) var3
(B) Computer
(C) Science
(D) Computer Science

The answer is: (A) var3 ☑

Q. Consider the main body of a C++ program,
string var1 = “Computer “;
string var2 = “Science”;
string var3 = var1 + var2;
cout << var3 << endl;
If the program is run, what will be displayed on the screen?
(A) var3
(B) Computer
(C) Science
(D) Computer Science

The answer is: (D) Computer Science ☑

Computer Science MCQs
Page: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10