You are on page 1of 2

SAZ BROTHERS

[ OOP WITH C++ ]

FUNCTIONS AND ARRAYS

i) A function has a ____, a _____ and a __. ii) In function overloading, two functions can have the same in a program. iii) When a function calls itself again and again, it is called . iv) An array is a collection of data elements of the same . v) The value is used to across the data element of an array. vi) A function with no return type is declared as . vii) Dynamic allocation of memory is done by operator. Answers: - 1. Name, data type and list of arguments, 2. Name, 3. Recursion, 4. Type, 5. Index, 6. Void 7. new STRINGS, POINTERS AND STRUCTURES i) Each string is terminated with a character. ii) The function is used to concatenate one string to the end of another string. iii) A is a variable that can hold the memory address of another variable. iv) A is a group of data elements that may have different data types. v) A variable points to another pointer. Answers: - 1. Null, 2. Strcat(), 3. Pointer,4. Structure, 5. Pointer to pointer UNION, ENUMERATION i) ii) iii) iv) v)
AND PREPROCESSOR

In a union, the address for each data element is the same. Enumeration is a type. Typedef is used to create a for a existing data type. A preprocessor directive begins with a symbol. The directive is used to read a source file called

file.

Answers: - 1. Starting, 2. User-defined, 3. Synonym,4. #, 5. #include, header


CLASSES AND OBJECTS

i) A class is a collection of and . ii) The member of a class cannot be accessed from outside the class. iii) An is a instance of a class. iv) A function is not a member of a class. v) The entire class has only one copy of a data member. vi) Variables of a class are called . vii) ( :: ) is known as . Answers: - 1. Data members and member functions, 2. Private, 3. Object,4. Friend, 5. Static ,6. data members 7. scope resolution operator. SAZ BROTHERS | BSCS 3rd Term (Session 2012-2016)...Gomal University

SAZ BROTHERS

[ OOP WITH C++ ]

CONSTRUCTORS, DESTRUCTORS AND OPERATOR OVERLOADING

i) ii) iii) iv)

A is used to initialize the objects of a class. A is used to free the memory space. A destructor name is preceded by a symbol. A constructor is used to copy on object into another object of the same class. v) The mechanism of providing a new definition to an operator is known as . vi) A constructor that takes no argument is known as . Answers: - 1. constructor, 2. Destructor, 3. tilde,4. copy, 5. operator overloading \ 6. default
INHERITANCE

i) The technique of creating a new class from an existing class is known as_______. ii) A class can inherit some or all the properties of a class. iii) When a class is privately inherited, the public members of the base class become In the derived class. iv) When a class is derived from another derived class, it is known as inheritance. v) The problem that occurs during multiple inheritance is known as . Answers: - 1. Inheritance, 2. Derived, base, 3. Private,4. Multilevel, 5. Ambiguity
VIRTUAL FUNCTIONS AND POLYMORPHISM

i) When one name is used in different forms, it is known as ___. ii) In static binding, all the needed information to call a function is known to the compiler at the . iii) Operator overloading is an example of binding. iv) A member function of the base class, which is overridden by the derived class, is known as a function. v) When a base class contains at least one function, it is known as an abstract class. vi) Function overloading is an example of . Answers: - 1. polymorphism, 2. compile time, 3. early,4. virtual, 5. Pure virtual 6. polymorphism 2

SAZ BROTHERS | BSCS 3rd Term (Session 2012-2016)...Gomal University

You might also like