MCQ Bank
which of the following option returns the state of end file?
- A)
- B)
- C)
- D)
What is the default access level for members of a class in C++?
- A) global
- B) protected
- C) private
- D) public
If the memory in the free store is not sufficient enough to fulfill the request, malloc() function return ________
- A)
- B)
- C)
- D)
An integer uses four bytes and the integer calculations occur in ______ bytes.
- A) 8
- B) 3
- C) 4
- D) 2
in C/C++ language, memory at runtime is allocated from ________
- A)
- B)
- C)
- D)
Which one of the following is used to perform bit-wise exclusive OR operation?
- A) |
- B) ||
- C) ^
- D) ~
When overloading assignment (=) operator, which of the following syntax is correct?
- A)
- B)
- C)
- D)
Which of the following is not a file opening mode_________________?
- A) ios::ate
- B) ios::out
- C) ios::in
- D) ios::truncate
which of the following code:
- A)
- B)
- C)
- D)
What is the use of ios::trunc mode?
- A) To open a file in output mode
- B) To truncate an existing file to half
- C) To truncate an existing file to zero
- D) To open a file in input mode
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