CS201 Quiz 4 Solution by Abu Huraira Faraz
Introduction to Programming
PDF 391 KBUpdated 23 Oct 2026
Quiz
CS201 Quiz 4 Solution by Abu Huraira Faraz
PDF 391 KB
vubuddy.com
- Type
- Quiz
- Course
- CS201 Introduction to Programming
- Size
- PDF 391 KB
- Updated
- 23 Oct 2026
Free download
0 of 3 used today
You get 3 free files a day on the website. Add the Chrome extension for 30 a day.
Preview text
Text from pages 1, 2, 3 of 3. Download the file for all 3 pages.
CS201 QUIZ NO: 4 SOLUTION FILE
EFFORT BY: ABU HURAIRA FARAZ
- Templates provide way of abstracting ________ information. Answer: type
- Class is a user defined __________ Answer: data type
- New operator is used to allocate memory from the free store during. Answer: run time
- Which one of the following is not a possible state for a pointer? Answer: point to a type
- Local variable are stored in an area called ________ Answer: stack
- Types of templates in c++ language are _______ Answer: 2
- __________ Variables are those that are defined outside of main. Answer: Global
- The return type of operator function for << operator is __________ Answer: reference of ostream class
(ostream&)
- The return type of operator function for >> operator is __________ Answer: reference of istream class
(istream&)
- The first parameter of operator function for << operator ________ Answer: must be passed by reference
- What does the following statements mean? Int (*fp) (char*) Answer: pointer to function talking a char* argument and returns an int.
- When an object of a class is defined inside another class then, Answer: constructor of enclosing class will
be called first
- Ostream is an _________ operator Answer: standalone
- What is the role of constructor in classes? Answer: to initialize the data member of an object when it is created
- We cannot define friends for the ________ that are already written and not in our control. Answer: functions
- A template function must have Answer: one are more than one argument
- Ostream class is ________ are not under our control. Answer: built in
- :: is called _______ Answer: scope resolution operator
- How many destructors are allowed in a class? Answer: 1
- A variable which is defined inside a function is called Answer: none of the given option
- The first parameter of operator function for << operator _________ Answer: must be object of class
- _______ Variables are defined in the main. Answer: local
- Which value can we not assign to reference? Answer: null
- Court << i << “ “;Court << d << “ “; Court << f ;
- Above statement can be written within statement of one line as: Answer: cout << I << “ “cout << d << “
“Cout << f ;
- When a variable is defined as static in a class than____________ Answer: only one copy is created for all
objects of this class
- What is the use of function get operator? Answer: overloading the objects
- What will happen when the function call operator is overloaded? Answer: it will not modify the functions
- When an objects of a class is defined inside another class then, Answer: destructor of inner object will be
called first
- Endl is a parameter-less __________ manipulator that insert the new line besides flushing the buffer. Answer:
built – in
- The stream insertion and extraction operators are not already overloaded for _________Answer: built – in
data types
- Variable are those that are defined outside of main. Answer: global
- Ostream class is _______ and not under our control. Answer: built – in
- Automatic variable are created on __________ Answer: stack
- Templates provide way of abstracting _________ information. Answer: type
- Which of the following is an example of static memory allocation? Answer: array
- Variable are defined in a main. Answer: local
- Variable are used to maintain state. Answer: static
- Local variable are stored in an area called ________ Answer: stack
- :: is called Answer: scope resolution operator
- Variable has a single copy for the whole class. Answer: local
- Static variable which is defined in a function is initialized ________ Answer: only once during its life time
- The operator used for dereferencing or indirection is __________ Answer: *
- What does STL stand for? Answer: standard template library
- Local variable are stored in an area called _______ Answer: free memory
- The stream insertion and extraction operators are not already overloaded for ________ Answer: user –
defined data types
- What is stl constructor? Answer: a constructor to initialize an object with the values of another object.
- In the member initializer list the data members are initialized. Answer: in the order in which they are
defined within class
- Which one of the following is not a possible state for a pointer? Answer: hold the address of the specific
object
- Local variable are stored in an area called __________ Answer: stack
- The first parameter of operator function for << operator __________ Answer: must be passed by reference
- Static data members of a class can be _____________ Answer: public and private
- In statement Matrix m2 = m1; Answer: Assignment operator is being used
- The operator function for << (stream insertion) >> and stream extraction must be Answer: non-member
function of class
- Choose the right option. String* x, y; Answer: x is a pointer to a string, y is a string
- Which one of the following is not a possible state for a pointer? Answer: point to a type
- Class is a user defined ____________ Answer: data type
- What does the following statement mean? Answer: pointer to a pointer
- Automatic variable are created on __________ Answer: stat storage
- New operator allocates memory from free state and return ___________ Answer: a pointer/ a float
number/an integer number
- When an object of a class is defined inside another class then, Answer: none of the given option
- What is role of a constructor in classes? Answer: to initialize the data members of an object when it is created
- To get the memory address of a variable we use _______ Answer: &
- When a variable is defined as static in a class than____________ Answer: a copy of this variable is created for only static objects.
- Variable has a single copy for the whole class. Answer: static
- We cannot define friends for the ________ that are already written and not in our control. Answer: classes
- When an object of a class is defined inside another class then, Answer: none of the given option
Related CS201 files
All CS201 files →- CS201 Highlighted Handouts Set 5 Highlighted PDF 7 MB
- CS201 Final Term Quiz 2023 Final term PDF 646 KB
- CS201 Short Notes (Word) Quiz DOC 54 KB
- CS201 Important Topics by Sir Zeeshan Salik Quiz PDF 667 KB
- CS201 Solved Quiz 1 with References Quiz PDF 170 KB
- CS201 Quiz File 2 by Attiq Kundi Quiz PDF 597 KB
Get more out of VUBuddy, for free
Android app
Free on Google Play
- Unlimited downloads
- The explanation behind every MCQ answer
- Study offline on slow data
Chrome extension
Free on the Chrome Web Store
- 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.