Sunday, February 28, 2010

:::|| VU Askari ||::: CS201 MCQs Help Required

Hi Friends,
 
Can anyone help me to solve these MCQs?
 

Question No: 10      ( Marks: 1 ) - Please choose one

 What is the sequence of event(s) when allocating memory using new operator?

 

       ► Only block of memory is allocated for objects

       ► Only constructor is called for objects

       ► Memory is allocated first before calling constructor

       ► Constructor is called first before allocating memory

 

Question No: 11      ( Marks: 1 ) - Please choose one

 What is the sequence of event(s) when deallocating memory using delete operator?

 

       ► Only block of memory is deallocated for objects

       ► Only destructor is called for objects

       ► Memory is deallocated first before calling destructor

       ► Destructor is called first before deallocating memory

 

Question No: 12      ( Marks: 1 ) - Please choose one

 new and delete operators cannot be overloaded as member functions.

       ► True

       ► False

 

Question No: 13      ( Marks: 1 ) - Please choose one

 The operator function of <<  and >> operators are always the member function of a class.

 

       ► True

       ► False


Question No: 14      ( Marks: 1 ) - Please choose one

 A template function must have at least ---------- generic data type

 

       ► Zero

       ► One

       ► Two

       ► Three

 

Question No: 15      ( Marks: 1 ) - Please choose one

 If we do not mention any return_value_type with a function, it will return an _____ value.

 

       ► int

       ► void

       ► double

       ► float

 

Question No: 16      ( Marks: 1 ) - Please choose one

 Suppose a program contains an array declared as int arr[100]; what will be the size of array?

 

       ► 0

       ► 99

       ► 100

       ► 101


Question No: 17      ( Marks: 1 ) - Please choose one

 The name of an array represents address of first location of array element.

 

       ► True

       ► False


Question No: 18      ( Marks: 1 ) - Please choose one

 Reusing the variables in program helps to save the memory

 

       ► True

       ► False

 

Question No: 19      ( Marks: 1 ) - Please choose one

 

Which of the following option is true about new operator to dynamically allocate memory to an object?

 

       ► The new operator determines the size of an object

       ► Allocates memory to object and returns pointer of valid type

       ► Creates an object and calls the constructor to initialize the object

       ► All of the given options

 

Question No: 20      ( Marks: 1 ) - Please choose one

 new and delete are _____ whereas malloc and free are _____.

 

       ► Functions, operators

       ► Classes, operators

       ► Operators, functions

       ► Operators, classes

 

Question No: 21      ( Marks: 1 ) - Please choose one

 Like member functions, ______ can also access the private data members of a class.

 

       ► Non-member functions

       ► Friend functions

       ► Any function outside class

       ► None of the given options


Question No: 22      ( Marks: 1 ) - Please choose one

 Which of the following statement is best regarding declaration of friend function?

 

       ► Friend function must be declared after public keyword.

       ► Friend function must be declared after private keyword.

       ► Friend function must be declared at the top within class definition.

       ► It can be declared anywhere in class as these are not affected by the public and  

            private keywords.


Question No: 23      ( Marks: 1 ) - Please choose one

The operator function overloaded for an Assignment operator (=) must be

 

       ► Non-member function of class

       ► Member function of class

       ► Friend function of class

       ► None of the given options



Question No: 24      ( Marks: 1 ) - Please choose one

 For non-member operator function, object on left side of the operator may be

 

       ► Object of operator class

       ► Object of different class

       ► Built-in data type

       ► All of the given options

 

Question No: 25      ( Marks: 1 ) - Please choose one

 The operator function will be implemented as _____, if obj1 drive the - operator whereas obj2 is passed as arguments to - operator in the statement given below.

obj3   =   obj1 -   obj2;

 

       ► Member function

       ► Non-member function

       ► Friend function

       ► None of the given options

 

Question No: 26      ( Marks: 1 ) - Please choose one

 Which one of the following is the declaration of overloaded pre-increment operator implemented as member function?

 

       ► Class-name operator +() ;

       ► Class-name operator +(int) ;

       ► Class-name operator ++() ;

       ► Class-name operator ++(int) ;


Question No: 27      ( Marks: 1 ) - Please choose one

 The static data members of a class are initialized _______

 

       ► at file scope

       ► within class definition

       ► within member function

       ► within main function

 

Question No: 28      ( Marks: 1 ) - Please choose one

 Class is a user defined___________.

 

       ► data type

       ► memory referee

       ► value

       ► none of the given options.

 

Question No: 29      ( Marks: 1 ) - Please choose one

 We can also define a user-defines manipulators.

 

       ► True

       ► False

 

Question No: 30      ( Marks: 1 ) - Please choose one

 Automatic variable are created on ________.

 

       ► Heap

       ► Free store

       ► static storage

       ► stack

--
Please visit www.vuaskari.com, get registered for old papers, quiz, assignments and GDBs...
You received this message because you are subscribed to the Google
Groups "VU_askari" group.
To post to this group, send email to vu_askari@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/vu_askari?hl=en?hl=en
Or contact Admin of the group askarihelpline@gmail.com or askarimithelpline@gmail.com for any problems/ suggestions/ complaints.

No comments:

Post a Comment