On Mon, Nov 1, 2010 at 11:00 PM, Sweet.VuStudent Sweet.VuStudent <sweet.vustudent@gmail.com> wrote:
Question No: 1 ( Marks: 1 ) - Please choose one
Which part of an object exhibits its state?
► Data ► Operations ► Any public part ► Any
private part
Question No: 2 ( Marks: 1 ) - Please choose one
Inheritance is a way to
► organize data. ► pass arguments to objects of classes.
► add features to existing classes without rewriting them.
► improve data-hiding and encapsulation.
Question No: 3 ( Marks: 1 ) - Please choose one
Suppose you have been given the following design,
"A person has a name, age, address and sex. You are designing a class
to represent a type of person called a patient. This kind of person
may be given a diagnosis, have a spouse and may be alive".
Given that the person class has already been created, what of the
following would be appropriate to include when you design the patient
class?
► registration date and diagnosis ► age and sex
► sex and diagnosis ► diagnosis and age
Question No: 4 ( Marks: 1 ) - Please choose one
What problem(s) may occur when we copy objects without using deep copy
constructor?
► Dangling pointer ► Memory Leakage ► All of the given
► System crash
Question No: 5 ( Marks: 1 ) - Please choose one
this pointers are not accessible for static member functions.
► True ► False
Question No: 6 ( Marks: 1 ) - Please choose one
A static member function cannot be declared.
► Static ► Implicit ► Explicit ► Virtual
Question No: 7 ( Marks: 1 ) - Please choose one
_______ remain in memory even when all objects of a class have been destroyed.
► Static variables ► Instance variable ► Primitive variables
► None of given
Question No: 8 ( Marks: 1 ) - Please choose one
Friend functions are _____________ functions of a class.
► None of given ► object member ► non-member ► data member
Question No: 9 ( Marks: 1 ) - Please choose one
Question No: 10 ( Marks: 1 ) - Please choose one
The statement objA=objB; will cause a compiler error if the objects
are of different classes.
► True ► False
Question No: 11 ( Marks: 1 ) - Please choose one
Identify which of the following overloaded operator function's
declaration is appropriate for the given call?
Rational_number_1 + 2.325
Where Rational_number_1 is an object of user defined class Rational_number.
► Rational_number operator+( Rational_number & obj);
► Rational_number operator+(double& obj);
► Rational_number operator+(Rational_number &obj, double& num);
► operator+(double& obj);
Question No: 12 ( Marks: 1 ) - Please choose one
Which operator can not be overloaded?
► The relation operator ( >= ) ► Assignment operator ( = )
► Script operator ( [] ) ► Conditional operator (? : )
Question No: 13 ( Marks: 1 ) - Please choose one
To convert from a user-defined class to a basic type, you would most likely use
► a built-in conversion operator. ► a one-argument constructor.
► an overloaded = operator. ► a conversion operator that's a
member of the class.
Question No: 14 ( Marks: 1 ) - Please choose one
The technique in which we visualize our programming problems according
to real life's problems is called----------------
► structured programming ► object oriented Programming
► procedural programming ► non of the given
Question No: 15 ( Marks: 1 ) - Please choose one
In object orientated programming, a class of objects cans
_____________ properties from another class of objects
► Utilize ► Borrow ► Inherit ► Adopt
Question No: 16 ( Marks: 1 ) - Please choose one
A C++ class is similar to --------------------
► Structure ► Header File ► Library File ►
None of the given
of the following is TRUE,
Select correct option: Derived class pointer can be used as Base
class pointer
Base class pointer can be used as Derived class pointer
Both of these options
None of these options
Compiler generated copy constructor performs,
Shallow copy
Deep copy
Both of these options
None of these options
Friends are used exactly the same for template and non-template classes.
True
False
Consider the code below, class class1{ public: void func1(); }; class
class2 : private class1 { }; Function func1 of class1 is ______ in
class2,
public
protected
private
none of the given options
Consider the following statements: 1) int iArray[5]; 2) int *pArr = iArray;
These statements will compile successfully
Error in first statement
Error in second statement
None of given options
Consider the following two lines of code written for a class Student,
1. Student sobj1,sobj2; 2. sobj2 = sobj1; In line No.2 what
constructor of Student class will be called,
Default constructor of Student class.
Copy constructor of student class
Both default and copy constructer of Student class
No constructor will be called.
User can make virtual table explicitly.
True
False
A template provides a convenient way to make a family of
variables and data members
functions and classes
classes and exceptions
programs and algorithms
Consider the code below, class class1{ private: void func1(); }; class
class2 : protected class1 { }; Function func1 of class1 is ______ in
class2,
public
protected
private
none of the given options
We can call base class constructor from derived class constructor,
From derived class constructor body
From the initializer list of derived class constructor
From any member function of derived class
We can not call the base class constructor
A function template must have a parameter.
True
False
Consider the code below, class class1{ protected: int i; }; class
class2 : public class1 { }; Then int member i of class1 is ______ in
class2,
public
protected
private
none of the given options
When we want to implement one class in terms of another class then we use,
Public inheritance
Protected inheritance
Private inheritance
None of these options
--
Contact to Admn. AamirAbbasMCS@gmail.com
Send email to group at: mcs-mit@googlegroups.com
Visit For Previous Papers http://groups.google.com/group/mcs-mit/files
Follow these Rules to stay long in Group:
http://groups.google.com/group/mcs-mit/web/group-rules
No comments:
Post a Comment
Note: only a member of this blog may post a comment.