Our experts have gathered these XInfosys C++ MCQs through research, and we hope that you will be able to see how much knowledge base you have for the subject of Infosys C++ by answering these multiple-choice questions.
Get started now by scrolling down!
A. A full stop (.)
B. A Comma (,)
C. A Semicolon (;)
D. A colon (:)
A. Print
B. Write
C. Cout
D. Cin
A. Cin
B. Input
C. Get
D. None of above
A. Keyboard
B. Mouse
C. Scanner
D. None of these
A.
B.
C.
D.
A. (dot)
B. (semi-colon)
C. (colon)
D. (single quote
A. Start()
B. Begin()
C. Main()
D. Output()
A. .(dot)
B. ;(semi-colon)
C. :(colon)
D. '(single quote)
A. Float
B. Real
C. Int
D. Double
A. It is a unary operator
B. It cannot be applied to an expression.
C. It associates from the right.
D. All of the above
What is the output of the following code snippet?
class test {
public:
static int n;
test () { n++; };
~test () { n--; };
};
int test::n=0;
int main () {
test a;
test b[5];
test * c = new test;
cout << a.n << endl;
delete c;
cout << test::n << endl;
return 0;
}
A.
7 6
B.
6 7
C.
5 6
D.
6 5
A. The outermost loop
B. The innermost loop
C. All loops are executed the same number of times
D. Cannot be determined without knowing the size of the loops
A. X~() {}
B. X() {}~
C. X() ~{}
D. X() {}
A. Statically typed language
B. Dynamically typed language
C. Both Statically and dynamically typed language
D. Type-less language
A. Namespaces refer to the memory space allocated for names used in a program
B. Namespaces refer to space between teh names in a program
C. Namespaces refer to space between the names in a program
D. Namespaces provide facilities for organizing the names in a program to avoid name clashes