MCQ Bank
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) ==
in C/C++, which of the following data type is used to store real numbers?
- A)
- B)
- C)
- D)
These functions seekg() and seekp() requires an argument of type ____________to determine that how many bytes to be move forward or backward.
- A) short
- B) long
- C) double
- D) int
C/C++ has many libraries which contain variables and function names normally starting with ________
- A)
- B)
- C)
- D)
A structure is a collection of _____________under a single name.
- A) None of the given
- B) values
- C) data
- D) variables
The coding of a program is translated into machine language by ________
- A)
- B)
- C)
- D)
_______ is the pointer which determines the position in a file from where the next read operation occurs.
- A) Tell
- B) Set
- C) Get
- D) Put
Learning "How to program" is important, because it develops ________ and problem solving abilities.
- A)
- B)
- C)
- D)
We have opened a file stream myfile for reading (getting), myfile.tellg () gives us the current get position of the file pointer. It returns a whole number of type___________
- A) short
- B) int
- C) long
- D) double
in C/C++, the algebraic expression (b2-4ac)/2a can be written as:
- A)
- B)
- C)
- D)
_________ is a special type of pointer we have to cast it before we use it.
- A) integer
- B) void
- C) double
- D) float