July 9, 2021 in C and CPP
What do you mean by abstraction? Is it necessary to create good abstraction?
b) What do you mean by abstraction? Is it necessary to create good abstraction?
July 9, 2021 in C and CPP
b) What do you mean by abstraction? Is it necessary to create good abstraction?
July 9, 2021 in C and CPP
a) What is the difference between an object-based language and an object-oriented
language?
July 9, 2021 in C and CPP
A. descructor B. ios C. polymorphism
D. ctype.h E. return F. class library
G. abstraction H. multiple inheritance I. constructor
J. overloading K. multilevel inheritance L. conio.h
4.1 A(n) ________ statement supplies a value from the called function to the calling
function.
4.2 ________ allows a derived class to have more than one base class.
4.3 toupper( ) is defined in ________.
4.4 ________ is the process of highlighting the essential, inherent aspects of an entity while ignoring irrelevant details.
4.5 A group of related classes, supplied as a separate product, is often called a(n)
________.
4.6 A(n) ________ is called to deallocate memory of the objects of a class.
4.7 The ability of a function or operator to act in different ways on different data types is called ________.
4.8 The base class for most stream classes is the ________ class.
4.9 getch( ) is defined in ________.
4.10 A language feature that allows a function or operator to be given more than one
definition is called ________.
July 9, 2021 in C and CPP
Each statement below is either TRUE or FALSE. Choose the most appropriate one
and ENTER in the “tear-off” sheet attached to the question paper, following
instructions therein.
2.1 The pre-increment and post-increment ++ operator can be overloaded.
2.2 It is illegal to make objects of one class as members of another class.
2.3 Only when an argument has been initialized to zero value, it is called the default
argument.
2.4 When calling a function, if the arguments are passed by reference, the function works
with the actual variables in the calling program.
2.5 The precedence of an operator can be changed by overloading it.
2.6 A pointer to a base class can point to an object of a derived class of that base class.
2.7 A derived class is often called a subclass because it represents a subset of its base
class.
2.8 Can we make a class as a friend?
2.9 The expression for (;;) is the same as a while loop with a test expression of true.
2.10 A const member function prevents modification of any of its class’s member data.
July 9, 2021 in C and CPP
1.10 A template class
A) is designed to be stored in different containers
B) works with different data types
C) generate objects which must all be identical
D) generates classes with different numbers of member functions
July 9, 2021 in C and CPP
1.9 What is the error in the following code?
class Test
{
virtual void draw( );
};
A) No error
B) Function draw( ) should be declared as static
C) Function draw( ) should be defined
D) Test class should contain data members
July 9, 2021 in C and CPP
1.8 Which of the following is good reason to use an object-oriented language?
A) It's easier to conceptualize an object-oriented program
B) program statements are simpler than in procedural languages
C) An object-oriented program can be taught to correct its own error
D) None of the above
July 9, 2021 in C and CPP
1.7 The library function exit() causes an exit from
A) the loop in which it occurs
B) the block in which it occurs
C) the function in which it occurs
D) the program in which it occurs
July 9, 2021 in C and CPP
1.6 A relational operator
A) assigns one operand to another
B) yields a Boolean result
C) logically combines two operands
D) None of the above
July 9, 2021 in C and CPP
1.5 The friend functions are used in situations where
A) we want to have access to unrelated classes
B) dynamic binding is required
C) we want to exchange data between classes
D) none of the above