MCQ Bank
For overloading minus (-) operator, which member operator function will be correct?
- A)
- B)
- C)
- D)
Constructor has ___________.
- A) the same name as data member
- B) the same name as of class
- C) return type
- D) no name
In C++ which operator is used for memory allocated?
- A)
- B)
- C)
- D)
The original value remains unchanged in _________.
- A) Pointers
- B) Call by value
- C) Dynamic Variables
- D) Call by reference
The Statement char array[10]; is an example of a type of ________ memory allocation
- A)
- B)
- C)
- D)
Structures are syntactically defined with the word_____________.
- A) structure
- B) struc
- C) struct
- D) None of the given
which of the following option not a source of the output stream?
- A)
- B)
- C)
- D)
For accessing data members we use _________ operator
- A) multiplication *
- B) plus +
- C) Division /
- D) dot .
A square matrix has ________
- A)
- B)
- C)
- D)
The memory allocation functions return a chunk of memory with a pointer of type_______________.
- A) void
- B) ptr
- C) integer
- D) float
The statement double** elements; says that elements is a / an ________ to double.
- A)
- B)
- C)
- D)
The heap memory structure __________.
- A) constantly changes in size
- B) contains no space
- C) remains constant
- D) is just like stack
A matrix is nothing but a ________ of numbers.
- A)
- B)
- C)
- D)
When accessing a structure member, the identifier to the left of the dot operator is the name of ______________.
- A) Structure member
- B) Structure data
- C) Structure variable
- D) Structure tag
A programmer can ________ the simple matrix class to handle the integer, float, or double data type as elements of the given matrix.
- A)
- B)
- C)
- D)
What will be the output of the following c++ code?
#include<iostream.h>
#define max 100
main()
{
#ifdef max
Cout<<”Hellow;
}
- A) Error
- B) Hello
- C) “Hellow”
- D) Max is 100
in C and C++ language, every expression has a ________ of its own?
- A)
- B)
- C)
- D)
In shifting operations if zero is inserted at the left most bit, the negative number will become a ______ number.
- A) Greater
- B) Negative
- C) Positive
- D) Smaller
The cycle of testing and ________ continues until the program is working perfectly without any problem.
- A)
- B)
- C)
- D)
_______________function gives the position of the next character to be read from that file.
- A) tellp()
- B) tellg()
- C) seekg()
- D) seekp()