July 16, 2021 in C and CPP
In which conditions it is compulsory to use friend function?
b) In which conditions it is compulsory to use friend function? What are the characteristics of a friend function?
July 16, 2021 in C and CPP
b) In which conditions it is compulsory to use friend function? What are the characteristics of a friend function?
July 16, 2021 in C and CPP
a) What is Inheritance? Explain the types of inheritance using diagram.
July 16, 2021 in C and CPP
c) What is an exception? What are the types of exception? Explain the exception handling
mechanism.
July 16, 2021 in C and CPP
b) What is function overloading? Explain it in detail giving suitable examples.
July 16, 2021 in C and CPP
a) Create a class STR having character array, ‘string’, as data member. Define a constructor and two member functions for the class to input and display the character array, respectively.
July 16, 2021 in C and CPP
c) Create a class measure having data members: feet and inch. Another class distance having
data members Meter. Define a function such that it adds two different objects of both the
classes and display equivalent distance in Centimeter. Define main ( ) to test the class.
July 16, 2021 in C and CPP
b) Explain in brief about Data Abstraction and Encapsulation.
July 16, 2021 in C and CPP
a) Explain how object-oriented programming is better than other programming techniques?
July 16, 2021 in C and CPP
A. Unsigned int B. cout C. cin
D. new E. Operator Overloading F. constructor
G. Structure H. Abstract class I. base
J. Declaration K. Continue L. derived
M. this N. Objects O. Current position
4.1 ________ pointer returns by reference.
4.2 A ________ can be used to convert a basic type to a class type data.
4.3 ________ operator enables dynamic memory allocation.
4.4 Level of inheritance means deriving a class out of ________ class.
4.5 ________ is the prototype of the function.
4.6 ________ could be replaced by a goto with a statement label where the label is associated with the first statement in the loop.
4.7 ________ is one that is not used to create objects.
4.8 ________ object belongs to a standard input stream.
4.9 ________ is called compile time polymorphism.
4.10 Array of ________ and array of structure are similar.
July 16, 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 Member function that operates on the data is called an object.
2.2 Lowercase and uppercase alphabets are mixed in variable names.
2.3 Input/output objects of C++ recognize enum data types.
2.4 Predefined variables can be used in function calls as arguments.
2.5 Objects can be furnished as function arguments.
2.6 It is possible to overload ‘+’ operator so that it can be used in string operations such as
x3=x1+x2, to perform concatenation.
2.7 Inheritance is identical to overloading.
2.8 It is always necessary to delete a pointer, set up by the new operator.
2.9 cout is called a predefined object of ostream class.
2.10 A constructor’s name is the same as class name.