CS201 VIVA Preparation
CS201 Some Definitions and Helping material for Viva1. What is a program?
A program is a precise sequence of steps to solve a particular problem.
2. What is a class?
We write a C++ program using data members, and functions. We call this program “class”.
3. What are data members?
The data members, functions and nested classes are called class members.
4. What is class layout?
The way in which data class members are arranged in a class object is called class layout.
5. What is class template?
A template is used for generating class types.
6. What is comment in Programing language?
Comments are used to explain the functioning of the programs. It helps to understand the code. C style of commenting is /*……..*/ also used in C++. And new line oriented C++ style is //………
7. What is a constructor?
A constructor initializes the data member of an object in the scope. It has no return type, and has the same name as class. We use many types of constructor by overloading them.
Types of constructor:
- Default constructor/compiler generated constructor
- Simple constructor (takes no arguments)
- Parameterized constructor (takes arguments)
- Constructor overloading
- Copy constructor
A function called when a class object goes out of scope. It cleans up the object, freeing resources like dynamic storage. The name of the destructor is the same as that of a class with preceding tilde sign (~). It could not be overloaded. It has no return type, and takes no argument.
9. Define #include?
The #include directive instructs the preprocessor to read and include a file into a source code file. The file name is typically enclosed with <…..> if the file is a system provided file, or in quotes “….” if the file is user provided.
10.For which purpose we use cout?
If we want to print something on the screen we use cout (Output stream) for this purpose.
CS201 LATEST SOLVED MCQS ATTACHMENTS# 1:
CS201 LATEST SOLVED MCQS ATTACHMENTS# 2:
CS201 2010.doc, 81 KB
CS201 - Final Term Papers 03.pdf, 91 KB
CS201 LATEST SOLVED MCQS ATTACHMENTS# 3:
CS201 - Final Term Papers 09.pdf, 119 KB
CS201 - Final Term Papers 12.pdf, 116 KB
CS201 LATEST SOLVED MCQS ATTACHMENTS# 4:
CS201 curent subjective solved.pdf, 219 KB