MCQ Bank
We cannot declare a function as a friend of ________ classes
- A) istream or ostream
- B)
- C)
- D)
Automatic variable are created constantly and destroyed
- A) All the time
- B)
- C)
- D)
________ are a conditional compilation process that is used to replace a piece of code by its definition in a program
- A) function
- B)
- C)
- D)
calloc() function allocates multiple blocks of memory and each block have ________ ?
- A) same size
- B)
- C)
- D)
in C++ sizeof operator is used to determine ________
- A)
- B)
- C)
- D)
which of the following header file deals with stream extraction?
- A) iostream.h
- B)
- C)
- D)
Type to use getch() function without including #include<conio.h> header file in the program is a ________ error
- A) compilation
- B)
- C)
- D)
in C++ the default constructor takes ________
- A) No arguments
- B)
- C)
- D)
in C++ the name of the ________ is the same as that of a class with a preceding tilde (~) sign.
- A) Destructor
- B)
- C)
- D)
which of the following option returns the state of end file?
- A) cin.eof()
- B)
- C)
- D)
If the memory in the free store is not sufficient enough to fulfill the request, malloc() function return ________
- A) Null
- B)
- C)
- D)
in C/C++ language, memory at runtime is allocated from ________
- A) Stack
- B)
- C)
- D)
When overloading assignment (=) operator, which of the following syntax is correct?
- A) void operator=( const String &s);
- B)
- C)
- D)
which of the following code:
- A) ***7
- B)
- C)
- D)
For overloading minus (-) operator, which member operator function will be correct?
- A) complex operator-(complex c)
- B)
- C)
- D)
In C++ which operator is used for memory allocated?
- A) New
- B)
- C)
- D)
The Statement char array[10]; is an example of a type of ________ memory allocation
- A) static
- B)
- C)
- D)
which of the following option not a source of the output stream?
- A) file
- B)
- C)
- D)
A square matrix has ________
- A) Equal number of rows and columns
- B)
- C)
- D)
The statement double** elements; says that elements is a / an ________ to double.
- A) Array of pointers
- B)
- C)
- D)