- Type
- Quiz
- Course
- CS201P Introduction to Programming (Practical)
- Size
- PDF 583 KB
- Updated
- 23 Oct 2026
You get 3 free files a day on the website. Add the Chrome extensionSign in with the extension for 30 a day.
Preview text
Text from pages 1, 2, 3 of 85. Download the file for all 85 pages.
CS201P Personal File Quiz
What is a user-defined data type in C++?
Class
Which function is automatically called when an object of a class is initiated?
Constructor
What do we call the data members that are visible only from inside the class and hidden from the outside?
A) Public B) Private C) Friend D) Private and Public Private
What will be the output of the following code?
void sampleFunction(int = 5, float = 4.1, char = 'A'); 50, 3.2, A int main(){ sampleFunction(50, 3.2);
void sampleFunction(int one, float two, char three) { cout << one << ", " << two << ", " << three;
A) 5, 3.2, A B) 5, 4.1, A C) 50, 3.2, A D) 50, 4.1, A Which of the following is not true about Destructor?
A) Destructors cannot be used for memory manipulation. B) Destructors take no arguments. C) Destructors cannot be overloaded. D) d) Destructors don’t return a value. Destructors cannot be overloaded.
In C++, which of the following option is used to declare a class?
class Which one is correct syntax for declaration of a function which can return a reference?
A) datatype& function_name (parameter list) B) &datatype function_name (parameter list) C) datatype (parameter list) &function_name D) &function_name datatype (parameter list) datatype& function_name (parameter list)
What is a constructor with arguments known as?
Paramterized Constructor
How can data encapsulation be achieved in C++?
Classes
In C++, what does the default constructor take?
No arguments
In C++, the name of the _________ is the same as that of a class with a preceding tilde (~) sign. Destructor
Related CS201P files
All CS201P files →Get more out of VUBuddy, for free
- Unlimited downloads
- The explanation behind every MCQ answer
- Study offline on slow data
- 30 downloads a day instead of 3
- Sign in and buy Pro Semester here
One Pro Semester membership works in both the extension and the app.