Tuesday, March 2, 2010

Re: :::|| VU Askari ||::: MCQ CS201

I have solved which i could.

On Tue, Mar 2, 2010 at 9:33 PM, mc090407138 Salman Mushtaq <mc090407138@vu.edu.pk> wrote:
Dear All,
 
I need help for the following MCQs,
 

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

When we do dynamic memory allocation in the constructor of a class, then it is necessary to provide a destructor.

 

       ► True

 

       ► False


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

Which of the following data type will be assumed if no data type is specified with constant?

       ► short


       ► float


       ► int


       ► double 


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

The prototype of friend functions must be written ____ the class and its definition must be written ____
       ► inside, inside the class

       ► inside, outside the class

       ► outside, inside the class

       ► outside, outside the class


Question No: 21      ( Marks: 1 ) - Please choose one
 
 If we want to use stream insertion and extraction operators with _______ then we have to overload these operators.

       ► int, float, double

       ► objects of class

       ► int, float, object

       ► int, char, float

Question No: 25      ( Marks: 1 ) - Please choose one
 
Consider the following code segment

class M {
   friend int operator!(const M &);
...
}; 

!s                                 // code of line implies that     operator!(s)
...

Let assume if s is an object of the class then function is implemented as ___________
       ► Member function
       ► Non-member function
       ► Binary operator function
       ► None of the given options


Question No: 26      ( Marks: 1 ) - Please choose one
 
When the compiler overloads the assignment (=) operator by default then __________

       ► compiler does member wise assignment.
       ► compiler does not allow default overload of assignment (=) operator
       ► member of the class are not assigned properly
       ► None of the given options


Question No: 30      ( Marks: 1 ) - Please choose one
 
Copy constructor becomes necessary while dealing with _______allocation in the class.

       ► Dynamic memory
       ► Static memory
       ► Both Dynamic and Static memory
       ► None of the given options


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

Which of the following function(s) is/are included in stdlib.h header file?


       ► double atof(const char *nptr)

       ► int atoi(const char *nptr)

       ► char *strcpy ( char *s1, const char *s2)

       ► 1 and 2 only

 

Question No: 6      ( Marks: 1 ) - Please choose one
 
Dealing with structures and functions passing  by reference is the most economical method

       ► True
       ► False


 Thanks in advance for all the friends.

Salman

--
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.



--

      <IMRAN>

--
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