CS201 Quiz Introduction to Programming C++ [4]
If we write a statement like s2 = s1; ___ will be the calling object and ____ will be passed to the = operator as an argument. ► s1, s1
► s1, s2
► s2, s1
► s2, s2
What will be the output of following statement?
cout << setfill(‘0’) << setw(7) << 128 ; ► 0000128
► 0128128
► 1280000
► 0012800
The stream insertion and extraction operators are not already overloaded for _______ ► Built-in data types
► User-defined data types
► Both built-in and user-defined types
► None of the given options
Constructors can not be overloaded like ordinary functions. ► True
► False
Overloaded new operator function takes parameter of type size_t and returns ► void (nothing)
► void pointer
► object pointer
► int pointer
Which of the following is the correct way to declare a variable x of integer type? ► x int ;
► integer x ;
► int x;
► x integer
Reserve words cannot be used as a variable name. ► True
► False
A template function must have at least ---------- generic data type ► Zero
► One
► Two
► Three
Template functions can also be overloaded ► True
► False
We can not make a member function of a class as template function. ► True
► False
When break statement is encountered in switch statement, it ► Stops the entire program
► Stops the execution of current statement
► Exits from switch statement
► None of the given options
We can also define a variable of user define data type (object) as static. ► True
► False