MCQ Bank
For a matrix, the variables of Rows and Columns should always be a ________
- A)
- B)
- C)
- D)
The malloc function takes ___________ argument(s).
- A) two
- B) four
- C) one
- D) three
After implementation of code is completed, we do its ________ to verify that it is behaving properly in all scenarios.
- A)
- B)
- C)
- D)
a ^= b; can be written as_________________.
- A) a = b ^ a;
- B) a = a^+b;
- C) a = a ^ b;
- D) a^= a + b;
which three constructs do we need to solve any problem?
- A)
- B)
- C)
- D)
The data, contained in the structure, is defined in the ______________.
- A) none
- B) curly braces
- C) parenthesis
- D) inverted commas
Declaration and definition of a template function should be in the ________ file
- A)
- B)
- C)
- D)
a = a & b; can be written as_____________.
- A) a = b;
- B) a &= b;
- C) a=a & b;
- D) a =& b;
For template function, we must have at least ________ generic argument.
- A)
- B)
- C)
- D)
How is #include “filename” different from #include <filename>?
- A) It includes binary files only
- B) It uses a different syntax with no functional difference
- C) It includes only header files with .cpp extension
- D) It searches the current directory first
In C++, which of the following option has the correct meaning of the expression "a<=b"?
- A)
- B)
- C)
- D)
The function overloading requires__________________.
- A) the argument list to be different.
- B) no arguments
- C) the arguments of integer type only
- D) the argument list to be the same
What will be the output of the following code? int x=15; int y=10; int z=5; cout<< x*x-4*y*z;
- A)
- B)
- C)
- D)
What is encapsulation in the context of classes?
- A) Grouping unrelated data
- B) Hiding data implementation details
- C) Making everything public
- D) Grouping functions only
Which of the following expression is correct in C/C++ language?
- A)
- B)
- C)
- D)
Multiplicatiive, Additive and assignment operators are ____ operators.
- A) Unary
- B) Conditional
- C) Binary
- D) Relational
Which of the following C++ statement is used to take input from the user?
- A)
- B)
- C)
- D)
Constructor is special type of function :
- A) which returns integer type data
- B) which returns NULL pointer
- C) which has no return type
- D) which returns zero
Which of the following is an example of logical operator?
- A)
- B)
- C)
- D)
Which one is the correct example of a unary operator?
- A) /
- B) -
- C) &
- D) ==