Home: Computer Science MCQs
Computer MCQs questions with answers for computer science or computer operator test preparation. Basic computer, IT, internet MCQ solved questions and answers.
Computer MCQs
Q. The internet protocol suite is a framework for communication protocols that is divided in
(A) four layers
(B) five layers
(C) six layers
(D) seven layers
The answer is: (A) four layers ☑
Q. The goto statement causes control to go to a/an
(A) function
(B) operator
(C) variable
(D) label
The answer is: (D) label ☑
Q. Bundling data and functions together is known as
(A) debugging
(B) encapsulation
(C) overloading
(D) polymorphism
The answer is: (B) encapsulation ☑
Q. What is the statement that displays the address of the variable myvar?
(A) myvar;
(B) &myvar;
(C) cout << myvar;
(D) cout << &myvar;
The answer is: (D) cout << &myvar; ☑
Q. An address is a ________, while a pointer is a ________.
(A) constant, variable
(B) variable, constant
(C) constant, constant
(D) variable, variable
The answer is: (A) constant, variable ☑
Q. In C++, a function name must be followed by
(A) braces
(B) parentheses
(C) statement
(D) variable name
The answer is: (B) parentheses ☑
Q. Consider the main body of a program,
string a = “4”;
string b = “8”;
string c = a + b;
cout << c << endl;
If the program is run, what will be displayed on the screen?
(A) 4
(B) 8
(C) 12
(D) 48
The answer is: (D) 48 ☑