CS201 Quiz 3 Fall 2024
Here are all the MCQs with answers:
-
Friend function declaration can go ___________________ the class
- Answer: only outside
-
In a class we can have ___________ constructor(s).
- Answer: many
-
Header files provide ______________ so the program running on one operating system can run without an error on the other system.
- Answer: portability
-
Windows operating system may itself take memory from ___________.
- Answer: heap
-
The members of a class declared with the keyword struct are _____________by default.
- Answer: public
-
The friend functions are _____________.
- Answer: not member of a class
-
If class A is a friend of class B, and class B is a friend of class C. If class A wants class C to be a friend, __________________
- Answer: it has to declare, class B as a friend
-
What will be the output of the following C++ code?
#include<iostream.h> #define max 100 main() { #ifdef max Cout<<”Hellow; }
- Answer: Error
-
Macros are categorized into _________ type(s).
- Answer: two
-
Destructor _______________________.
- Answer: cannot be overloaded and have no return type