CS201 Quiz Introduction to Programming C++
Question No: 1 ( Marks: 1 ) - Please choose one
If most significant bit of un-signed number is 1 then it represents a positive number.► True
► False
Question No: 2 ( Marks: 1 ) - Please choose one
If there is a symbol (& sign) used with the variable name followed by data type then it refers to _____ and if & is being used with variable name then it refers to _____.► Address of variable, reference variable
► Reference variable, value of variable
► Reference variable, address of variable
► Address of variable, value of variable
Question No: 3 ( Marks: 1 ) - Please choose one
We can also do conditional compilation with preprocessor directives.► True
► False
Question No: 4 ( Marks: 1 ) - Please choose one
The default value of a parameter can be provided inside the ________________► function prototype
► function definition
► both function prototype or function definition
► none of the given options.
Question No: 5 ( Marks: 1 ) - Please choose one
Classes defined inside other classes are called ________ classes► looped
► nested
► overloaded
► none of the given options.
Question No: 6 ( Marks: 1 ) - Please choose one
What purpose do classes serve?► Data encapsulation
► Providing a convenient way of modeling real-world objects
► Simplifying code reuse
► All of the given options
Question No: 7 ( Marks: 1 ) - Please choose one
Every class contains _______________.► Constructor
► Destructor
► Both a constructor and a destructor
► None of the given options
Question No: 8 ( Marks: 1 ) - Please choose one
new operator is used to allocate memory from the free store during► Compile Time
► Run Time
► Link Time
► None of the given options
Question No: 9 ( Marks: 1 ) - Please choose one
When an object of a class is defined inside another class then,► Destructor of enclosing class will be called first
► Destructor of inner object will be called first
► Constructor and Destructor will be called simultaneously
► None of the given options
Question No: 10 ( Marks: 1 ) - Please choose one
It is possible to define a class within another class.► True
► False