C++ MCQ’s- Part-2
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | Which of the following is not the member of class? |
| ((OPTION_A)) | Static function |
| ((OPTION_B)) | Friend function |
| ((OPTION_C)) | Const function |
| ((OPTION_D)) | Virtual function |
| ((CORRECT_CHOICE)) (A/B/C/D) | B |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | Which of the following concepts means determining at runtime what method to invoke? |
| ((OPTION_A)) | Data hiding |
| ((OPTION_B)) | Dynamic Typing |
| ((OPTION_C)) | Dynamic binding |
| ((OPTION_D)) | Dynamic loading |
| ((CORRECT_CHOICE)) (A/B/C/D) | C |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | The friend functions are used in situations where: |
| ((OPTION_A)) | We want to have access to unrelated classes |
| ((OPTION_B)) | Dynamic binding is required |
| ((OPTION_C)) | Exchange of data between classes to take place |
| ((OPTION_D)) | None of the above |
| ((CORRECT_CHOICE)) (A/B/C/D) | D |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | The keyword friend does not appear in |
| ((OPTION_A)) | The class allowing access to another class |
| ((OPTION_B)) | The class desiring access to another class |
| ((OPTION_C)) | The private section of a class |
| ((OPTION_D)) | The public section of a class |
| ((CORRECT_CHOICE)) (A/B/C/D) | C |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | The term __________ means the ability to take many forms. |
| ((OPTION_A)) | Inheritance |
| ((OPTION_B)) | Polymorphism |
| ((OPTION_C)) | Member function |
| ((OPTION_D)) | Encapsulation |
| ((CORRECT_CHOICE)) (A/B/C/D) | B |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | C++ was originally developed by |
| ((OPTION_A)) | Clocksin and Melish |
| ((OPTION_B)) | Donald E.Knuth |
| ((OPTION_C)) | Sir Richard Hadlee |
| ((OPTION_D)) | Bjarne Stroustrup |
| ((CORRECT_CHOICE)) (A/B/C/D) | D |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | A variable defined within a block is visible |
| ((OPTION_A)) | From the point of definition onward in the program |
| ((OPTION_B)) | From the point of definition onward in the function |
| ((OPTION_C)) | From the point of definition onward in the block |
| ((OPTION_D)) | Throughout the function |
| ((CORRECT_CHOICE)) (A/B/C/D) | C |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | Which of the following term is used for a function defined inside a class? |
| ((OPTION_A)) | Member Variable |
| ((OPTION_B)) | Member function |
| ((OPTION_C)) | Class function |
| ((OPTION_D)) | Classic function |
| ((CORRECT_CHOICE)) (A/B/C/D) | B |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | Which of the following concept of oops allows compiler to insert arguments in a function call if it is not specified? |
| ((OPTION_A)) | Call by value |
| ((OPTION_B)) | Call by reference |
| ((OPTION_C)) | Default arguments |
| ((OPTION_D)) | Call by pointer |
| ((CORRECT_CHOICE)) (A/B/C/D) | C |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | How many instances of an abstract class can be created? |
| ((OPTION_A)) | 1 |
| ((OPTION_B)) | 5 |
| ((OPTION_C)) | 13 |
| ((OPTION_D)) | 0 |
| ((CORRECT_CHOICE)) (A/B/C/D) | D |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | Which of the following cannot be friend? |
| ((OPTION_A)) | Function |
| ((OPTION_B)) | Class |
| ((OPTION_C)) | Object |
| ((OPTION_D)) | Operator function |
| ((CORRECT_CHOICE)) (A/B/C/D) | C |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | Which of the following concepts of OOPS means exposing only necessary information to client? |
| ((OPTION_A)) | Encapsulation |
| ((OPTION_B)) | Abstraction |
| ((OPTION_C)) | Data hiding |
| ((OPTION_D)) | Data binding |
| ((CORRECT_CHOICE)) (A/B/C/D) | C |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | In structured programming, the problem is divided into various ______. |
| ((OPTION_A)) | modules |
| ((OPTION_B)) | functions |
| ((OPTION_C)) | structures |
| ((OPTION_D)) | objects |
| ((CORRECT_CHOICE)) (A/B/C/D) | B |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | In Object-oriented programming, the problem is divided into _____. |
| ((OPTION_A)) | classes & objects |
| ((OPTION_B)) | functions |
| ((OPTION_C)) | structures |
| ((OPTION_D)) | modules |
| ((CORRECT_CHOICE)) (A/B/C/D) | A |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | A class is ____ datatype. |
| ((OPTION_A)) | primitive |
| ((OPTION_B)) | derived |
| ((OPTION_C)) | user-defined |
| ((OPTION_D)) | . All of these |
| ((CORRECT_CHOICE)) (A/B/C/D) | C |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | A class is a collection of ____ and_____. |
| ((OPTION_A)) | data-members & member functions |
| ((OPTION_B)) | data-members, member functions and main() |
| ((OPTION_C)) | data-members, member functions,main() and include statements |
| ((OPTION_D)) | None of these |
| ((CORRECT_CHOICE)) (A/B/C/D) | A |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | An object is …… |
| ((OPTION_A)) | a variable of class datatype. |
| ((OPTION_B)) | same as a class. |
| ((OPTION_C)) | just like a global variable. |
| ((OPTION_D)) | collection of data-members and member functions. |
| ((CORRECT_CHOICE)) (A/B/C/D) | A |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | Wrapping up of data & functions together in a class is known as _____. |
| ((OPTION_A)) | Overloading |
| ((OPTION_B)) | Data Abstraction |
| ((OPTION_C)) | Polymorphism |
| ((OPTION_D)) | Encapsulation |
| ((CORRECT_CHOICE)) (A/B/C/D) | D |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | Including only necessary details and ignoring additional details while defining a class is known as ____. |
| ((OPTION_A)) | Overloading |
| ((OPTION_B)) | Data Abstraction |
| ((OPTION_C)) | Polymorphism |
| ((OPTION_D)) | Encapsulation |
| ((CORRECT_CHOICE)) (A/B/C/D) | B |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | Preventing direct access of data-members of the class from outside world is known as ____. |
| ((OPTION_A)) | Polymorphism |
| ((OPTION_B)) | Encapsulation |
| ((OPTION_C)) | Data Hiding |
| ((OPTION_D)) | scope resolution. |
| ((CORRECT_CHOICE)) (A/B/C/D) | C |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | What are cin and cout? |
| ((OPTION_A)) | pointers |
| ((OPTION_B)) | functions |
| ((OPTION_C)) | operator |
| ((OPTION_D)) | stream objects |
| ((CORRECT_CHOICE)) (A/B/C/D) | D |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | Which header file must be included for cin and cout? |
| ((OPTION_A)) | stdio.h |
| ((OPTION_B)) | conio.h |
| ((OPTION_C)) | iostream.h |
| ((OPTION_D)) | Both iostream.h and conio.h |
| ((CORRECT_CHOICE)) (A/B/C/D) | C |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | Creating a new class using one or more existing classes is known as ____. |
| ((OPTION_A)) | Polymorphism |
| ((OPTION_B)) | Encapsulation |
| ((OPTION_C)) | overloading |
| ((OPTION_D)) | inheritance |
| ((CORRECT_CHOICE)) (A/B/C/D) | D |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | Ability of an operator or function call to take different forms is known as ____. |
| ((OPTION_A)) | Polymorphism |
| ((OPTION_B)) | Encapsulation |
| ((OPTION_C)) | overloading |
| ((OPTION_D)) | inheritance |
| ((CORRECT_CHOICE)) (A/B/C/D) | A |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | cout is a/an __________ . |
| ((OPTION_A)) | operator |
| ((OPTION_B)) | function |
| ((OPTION_C)) | object |
| ((OPTION_D)) | macro |
| ((CORRECT_CHOICE)) (A/B/C/D) | C |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | Which of the following concepts provides facility of using object of one class inside another class? |
| ((OPTION_A)) | Encapsulation |
| ((OPTION_B)) | Abstraction |
| ((OPTION_C)) | Composition |
| ((OPTION_D)) | Inheritance |
| ((CORRECT_CHOICE)) (A/B/C/D) | C |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | How many types of polymorphisms are supported by C++? |
| ((OPTION_A)) | 1 |
| ((OPTION_B)) | 2 |
| ((OPTION_C)) | 3 |
| ((OPTION_D)) | 4 |
| ((CORRECT_CHOICE)) (A/B/C/D) | B |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | Which of the following is an abstract data type? |
| ((OPTION_A)) | int |
| ((OPTION_B)) | double |
| ((OPTION_C)) | string |
| ((OPTION_D)) | Class |
| ((CORRECT_CHOICE)) (A/B/C/D) | D |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | A __________ is a special method used to initialize the instance variable of a class. |
| ((OPTION_A)) | Member function |
| ((OPTION_B)) | Destructor |
| ((OPTION_C)) | Constructor |
| ((OPTION_D)) | Structure |
| ((CORRECT_CHOICE)) (A/B/C/D) | C |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | Which of the following concepts means adding new components to a program as it runs? |
| ((OPTION_A)) | Data hiding |
| ((OPTION_B)) | Dynamic typing |
| ((OPTION_C)) | Dynamic binding |
| ((OPTION_D)) | Dynamic loading |
| ((CORRECT_CHOICE)) (A/B/C/D) | D |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | Which of the following statement is correct? |
| ((OPTION_A)) | A constructor is called at the time of declaration of an object. |
| ((OPTION_B)) | A constructor is called at the time of use of an object. |
| ((OPTION_C)) | A constructor is called at the time of declaration of a class. |
| ((OPTION_D)) | A constructor is called at the time of use of a class. |
| ((CORRECT_CHOICE)) (A/B/C/D) | A |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | Which of the following approach is adapted by C++? |
| ((OPTION_A)) | Top-down |
| ((OPTION_B)) | Bottom-up |
| ((OPTION_C)) | Right-left |
| ((OPTION_D)) | Left-right |
| ((CORRECT_CHOICE)) (A/B/C/D) | B |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | Which of the following is correct about class and structure? |
| ((OPTION_A)) | class can have member functions while structure cannot. |
| ((OPTION_B)) | class data members are public by default while that of structure are private |
| ((OPTION_C)) | Pointer to structure or classes cannot be declared. |
| ((OPTION_D)) | class data members are private by default while that of structure are public by default. |
| ((CORRECT_CHOICE)) (A/B/C/D) | D |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | Which of the following concepts means wrapping up of data and functions together? |
| ((OPTION_A)) | Abstraction |
| ((OPTION_B)) | Encapsulation |
| ((OPTION_C)) | Inheritance |
| ((OPTION_D)) | Polymorphism |
| ((CORRECT_CHOICE)) (A/B/C/D) | B |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | Which of the following concepts means waiting until runtime to determine which function to call? |
| ((OPTION_A)) | Data hiding |
| ((OPTION_B)) | Dynamic casting |
| ((OPTION_C)) | Dynamic binding |
| ((OPTION_D)) | Dynamic loading |
| ((CORRECT_CHOICE)) (A/B/C/D) | C |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | Which of the following operator is overloaded for object cout? |
| ((OPTION_A)) | >> |
| ((OPTION_B)) | << |
| ((OPTION_C)) | + |
| ((OPTION_D)) | = |
| ((CORRECT_CHOICE)) (A/B/C/D) | B |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | Which of the following is the correct class of the object cout? |
| ((OPTION_A)) | iostream |
| ((OPTION_B)) | istream |
| ((OPTION_C)) | ostream |
| ((OPTION_D)) | ifstream |
| ((CORRECT_CHOICE)) (A/B/C/D) | C |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | Which of the following cannot be used with the keyword virtual? |
| ((OPTION_A)) | class |
| ((OPTION_B)) | member functions |
| ((OPTION_C)) | constructor |
| ((OPTION_D)) | destructor |
| ((CORRECT_CHOICE)) (A/B/C/D) | C |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | Which of the following functions are performed by a constructor? |
| ((OPTION_A)) | Construct a new class |
| ((OPTION_B)) | Construct a new object |
| ((OPTION_C)) | Construct a new function |
| ((OPTION_D)) | Initialize objects |
| ((CORRECT_CHOICE)) (A/B/C/D) | D |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | Which of the following is the correct way of declaring a function as constant? |
| ((OPTION_A)) | const int ShowData(void) { /* statements */ } |
| ((OPTION_B)) | int const ShowData(void) { /* statements */ } |
| ((OPTION_C)) | int ShowData(void) const { /* statements */ } |
| ((OPTION_D)) | Both A and B |
| ((CORRECT_CHOICE)) (A/B/C/D) | C |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | Which of the following statement is correct? |
| ((OPTION_A)) | C++ allows static type checking. |
| ((OPTION_B)) | C++ allows dynamic type checking. |
| ((OPTION_C)) | C++ allows static member function be of type const. |
| ((OPTION_D)) | Both A and B. |
| ((CORRECT_CHOICE)) (A/B/C/D) | D |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | Which of the following header file includes definition of cin and cout? |
| ((OPTION_A)) | istream.h |
| ((OPTION_B)) | ostream.h |
| ((OPTION_C)) | iomanip.h |
| ((OPTION_D)) | iostream.h |
| ((CORRECT_CHOICE)) (A/B/C/D) | D |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | What will happen if a class is not having any name? |
| ((OPTION_A)) | It cannot have a destructor. |
| ((OPTION_B)) | It cannot have a constructor. |
| ((OPTION_C)) | It is not allowed. |
| ((OPTION_D)) | Both A and B. |
| ((CORRECT_CHOICE)) (A/B/C/D) | D |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | Which one of the following is correct about the statements given below?
All function calls are resolved at compile-time in Procedure Oriented Programming. All function calls are resolved at compile-time in OOPS |
| ((OPTION_A)) | Only II is correct. |
| ((OPTION_B)) | Both I and II are correct. |
| ((OPTION_C)) | Only I is correct. |
| ((OPTION_D)) | Both I and II are incorrect. |
| ((CORRECT_CHOICE)) (A/B/C/D) | C |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | Which one of the following options is correct? |
| ((OPTION_A)) | Friend function can access public data members of the class. |
| ((OPTION_B)) | Friend function can access protected data members of the class. |
| ((OPTION_C)) | Friend function can access private data members of the class. |
| ((OPTION_D)) | All of the above |
| ((CORRECT_CHOICE)) (A/B/C/D) | D |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | Which of the following statements is correct in C++? |
| ((OPTION_A)) | Classes cannot have data as protected members. |
| ((OPTION_B)) | Structures can have functions as members. |
| ((OPTION_C)) | Class members are public by default. |
| ((OPTION_D)) | Structure members are private by default. |
| ((CORRECT_CHOICE)) (A/B/C/D) | B |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | Which of the following access specifier is used as a default in a class definition? |
| ((OPTION_A)) | protected |
| ((OPTION_B)) | public |
| ((OPTION_C)) | private |
| ((OPTION_D)) | friend |
| ((CORRECT_CHOICE)) (A/B/C/D) | C |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | What is correct about the static data member of a class? |
| ((OPTION_A)) | A static member function can access only static data members of a class. |
| ((OPTION_B)) | A static data member is shared among all the object of the class. |
| ((OPTION_C)) | A static data member can be accessed directly from main(). |
| ((OPTION_D)) | Both A and B. |
| ((CORRECT_CHOICE)) (A/B/C/D) | D |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | Which of the following provides a reuse mechanism? |
| ((OPTION_A)) | Abstraction |
| ((OPTION_B)) | Inheritance |
| ((OPTION_C)) | Dynamic binding |
| ((OPTION_D)) | Encapsulation |
| ((CORRECT_CHOICE)) (A/B/C/D) | B |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | Which of the following statement is correct? |
| ((OPTION_A)) | Class is an instance of object. |
| ((OPTION_B)) | Object is an instance of a class. |
| ((OPTION_C)) | Class is an instance of data type |
| ((OPTION_D)) | Object is an instance of data type |
| ((CORRECT_CHOICE)) (A/B/C/D) | B |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | The process of building new classes from existing one is called |
| ((OPTION_A)) | Structure |
| ((OPTION_B)) | Inheritance |
| ((OPTION_C)) | Polymorphism |
| ((OPTION_D)) | Template |
| ((CORRECT_CHOICE)) (A/B/C/D) | B |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | In a class, member variables are often called its _________, and its member functions are sometimes referred to as its behaviour, or ____________. |
| ((OPTION_A)) | attributes, methods |
| ((OPTION_B)) | none of these |
| ((OPTION_C)) | values, morals |
| ((OPTION_D)) | data, activities |
| ((CORRECT_CHOICE)) (A/B/C/D) | A |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | Which of these keywords are access specifiers? |
| ((OPTION_A)) | near and far |
| ((OPTION_B)) | opened and closed |
| ((OPTION_C)) | table and row |
| ((OPTION_D)) | private and public |
| ((CORRECT_CHOICE)) (A/B/C/D) | D |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | An Object can be declared prior to the class definition |
| ((OPTION_A)) | True |
| ((OPTION_B)) | False: |
| ((OPTION_C)) | |
| ((OPTION_D)) | |
| ((CORRECT_CHOICE)) (A/B/C/D) | B |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | Use of __________ protects data from inadvertent modifications |
| ((OPTION_A)) | . protect() member function |
| ((OPTION_B)) | private access specifier |
| ((OPTION_C)) | class protection operator, @ |
| ((OPTION_D)) | none of these |
| ((CORRECT_CHOICE)) (A/B/C/D) | B |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | Use of __________ protects data from inadvertent modifications |
| ((OPTION_A)) | . protect() member function |
| ((OPTION_B)) | private access specifier |
| ((OPTION_C)) | class protection operator, @ |
| ((OPTION_D)) | none of these |
| ((CORRECT_CHOICE)) (A/B/C/D) | B |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | A suitable place to store Class declarations is _______. |
| ((OPTION_A)) | none of these |
| ((OPTION_B)) | their own header files |
| ((OPTION_C)) | Auxiliary .cpp file |
| ((OPTION_D)) | main .cpp files, along with function definitions |
| ((CORRECT_CHOICE)) (A/B/C/D) | B |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | Inline Functions are invoked at |
| ((OPTION_A)) | Run time |
| ((OPTION_B)) | Compile time |
| ((OPTION_C)) | Depends on how it is invoked |
| ((OPTION_D)) | Both b and c above |
| ((CORRECT_CHOICE)) (A/B/C/D) | B |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | which of the following operator is used to define member function outside the class? |
| ((OPTION_A)) | :: |
| ((OPTION_B)) | ? |
| ((OPTION_C)) | 😕 |
| ((OPTION_D)) | % |
| ((CORRECT_CHOICE)) (A/B/C/D) | A |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | function call mechanism that passes arguments to a function by passing a copy of the values of the arguments is __________ |
| ((OPTION_A)) | call by name |
| ((OPTION_B)) | call by value |
| ((OPTION_C)) | call by reference |
| ((OPTION_D)) | call by value result |
| ((CORRECT_CHOICE)) (A/B/C/D) | B |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | Data members which are static |
| ((OPTION_A)) | cannot be assigned a value |
| ((OPTION_B)) | can only be used in static functions |
| ((OPTION_C)) | cannot be defined in a Union |
| ((OPTION_D)) | can be accessed outside the class |
| ((CORRECT_CHOICE)) (A/B/C/D) | B |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | Which of the following is false for cin? |
| ((OPTION_A)) | It represents standard input. |
| ((OPTION_B)) | It is an object of istream class. |
| ((OPTION_C)) | It is a class of which stream is an object. |
| ((OPTION_D)) | Using cin the data can be read from user’s terminal |
| ((CORRECT_CHOICE)) (A/B/C/D) | C |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | It is possible to declare as a friend |
| ((OPTION_A)) | a member function |
| ((OPTION_B)) | a global function |
| ((OPTION_C)) | a class |
| ((OPTION_D)) | all of the above |
| ((CORRECT_CHOICE)) (A/B/C/D) | D |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | Given a class named Book, which of the following is not a valid constructor? |
| ((OPTION_A)) | Book ( ) { } |
| ((OPTION_B)) | Book ( Book b) { } |
| ((OPTION_C)) | Book ( Book &b) { } |
| ((OPTION_D)) | Book (char* author, char* title) { } |
| ((CORRECT_CHOICE)) (A/B/C/D) | B |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | How many constructors can a class have |
| ((OPTION_A)) | 0 |
| ((OPTION_B)) | 1 |
| ((OPTION_C)) | 2 |
| ((OPTION_D)) | any number |
| ((CORRECT_CHOICE)) (A/B/C/D) | D |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | The new operator |
| ((OPTION_A)) | returns a pointer to the variable |
| ((OPTION_B)) | creates a variable called new |
| ((OPTION_C)) | obtains memory for a new variable |
| ((OPTION_D)) | tells how much memory is available |
| ((CORRECT_CHOICE)) (A/B/C/D) | C |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | A static function |
| ((OPTION_A)) | should be called when an object is destroyed |
| ((OPTION_B)) | is closely connected with and individual object of a class |
| ((OPTION_C)) | can be called using the class name and function name |
| ((OPTION_D)) | is used when a dummy object must be created |
| ((CORRECT_CHOICE)) (A/B/C/D) | C |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | We can output text to an object of class ostream using the insertion operator<< because |
| ((OPTION_A)) | the ostream class is a stream |
| ((OPTION_B)) | the insertion operator works with all classes |
| ((OPTION_C)) | we are actually outputting to cout |
| ((OPTION_D)) | the insertion operator is overloaded in ostream |
| ((CORRECT_CHOICE)) (A/B/C/D) | D |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | Which of the following is not the characteristic of constructor ? |
| ((OPTION_A)) | They should be declared in the public section. |
| ((OPTION_B)) | They do not have return type. |
| ((OPTION_C)) | They can not be inherited. |
| ((OPTION_D)) | They can be virtual. |
| ((CORRECT_CHOICE)) (A/B/C/D) | D |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | A class defined within another class is: |
| ((OPTION_A)) | Nested class |
| ((OPTION_B)) | Inheritance |
| ((OPTION_C)) | Containership |
| ((OPTION_D)) | Encapsulation |
| ((CORRECT_CHOICE)) (A/B/C/D) | A |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | Which of the following statements are true in c++? |
| ((OPTION_A)) | Classes can not have data as public members |
| ((OPTION_B)) | Structures can not have functions as members |
| ((OPTION_C)) | Class members are public by default |
| ((OPTION_D)) | None of these |
| ((CORRECT_CHOICE)) (A/B/C/D) | B |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | The following can be declared as friend in a class |
| ((OPTION_A)) | an object |
| ((OPTION_B)) | a class |
| ((OPTION_C)) | a public data member |
| ((OPTION_D)) | a private data member |
| ((CORRECT_CHOICE)) (A/B/C/D) | B |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | A copy constructor takes |
| ((OPTION_A)) | no argument |
| ((OPTION_B)) | one argument |
| ((OPTION_C)) | two arguments |
| ((OPTION_D)) | arbitrary no. of arguments |
| ((CORRECT_CHOICE)) (A/B/C/D) | B |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | Which can be passed as an argument to a function? |
| ((OPTION_A)) | constant |
| ((OPTION_B)) | expression |
| ((OPTION_C)) | another function |
| ((OPTION_D)) | all of the above. |
| ((CORRECT_CHOICE)) (A/B/C/D) | A |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | Member functions, when defined within the class specification: |
| ((OPTION_A)) | are always inline. |
| ((OPTION_B)) | are not inline. |
| ((OPTION_C)) | are inline by default, unless they are too big or too complicated. |
| ((OPTION_D)) | are not inline by default. |
| ((CORRECT_CHOICE)) (A/B/C/D) | A |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | An entity representing some characteristics and behaviour is- |
| ((OPTION_A)) | object |
| ((OPTION_B)) | class |
| ((OPTION_C)) | struct |
| ((OPTION_D)) | none of the above |
| ((CORRECT_CHOICE)) (A/B/C/D) | A |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | Which of the following is not the feature of OOPs? |
| ((OPTION_A)) | Data Encapsulation |
| ((OPTION_B)) | Inheritance |
| ((OPTION_C)) | Polymorphism |
| ((OPTION_D)) | None of the above |
| ((CORRECT_CHOICE)) (A/B/C/D) | D |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | The wrapping up of data and functions into a single unit is |
| ((OPTION_A)) | Data Abstraction |
| ((OPTION_B)) | Data Encapsulation |
| ((OPTION_C)) | Both (a) & (b) |
| ((OPTION_D)) | None of the above |
| ((CORRECT_CHOICE)) (A/B/C/D) | B |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | Which of the following feature supports reusability and extensibility of classes? |
| ((OPTION_A)) | Inheritance |
| ((OPTION_B)) | Overloading |
| ((OPTION_C)) | Polymorphism |
| ((OPTION_D)) | None of the above |
| ((CORRECT_CHOICE)) (A/B/C/D) | A |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | Inheritance is ………..in nature. |
| ((OPTION_A)) | Intransitive |
| ((OPTION_B)) | Transitive |
| ((OPTION_C)) | Both (a) & (b) |
| ((OPTION_D)) | None of the above |
| ((CORRECT_CHOICE)) (A/B/C/D) | B |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | ………… is the ability for a message or data to be processed in more than one form |
| ((OPTION_A)) | Class |
| ((OPTION_B)) | Abstraction |
| ((OPTION_C)) | Polymorphism |
| ((OPTION_D)) | None of the above |
| ((CORRECT_CHOICE)) (A/B/C/D) | C |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | The smallest individual unit in a program is ……… |
| ((OPTION_A)) | Keyword |
| ((OPTION_B)) | Identifier |
| ((OPTION_C)) | Token |
| ((OPTION_D)) | None of the above |
| ((CORRECT_CHOICE)) (A/B/C/D) | C |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | Which of the following features of procedure oriented programming is false |
| ((OPTION_A)) | Large programs are divided into small or units called functions |
| ((OPTION_B)) | Employs bottom-up approach in program design. |
| ((OPTION_C)) | Most of the functions share global data. |
| ((OPTION_D)) | None of the above. |
| ((CORRECT_CHOICE)) (A/B/C/D) | B |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | Which of the following features of object oriented programming is false? |
| ((OPTION_A)) | Data is hidden and is not available to external functions. |
| ((OPTION_B)) | New data & functions can be added easily. |
| ((OPTION_C)) | Objects may communicate with each other through functions. |
| ((OPTION_D)) | Emphasis is on the procedure rather than data. |
| ((CORRECT_CHOICE)) (A/B/C/D) | D |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | The following is the C++ style comment |
| ((OPTION_A)) | // |
| ((OPTION_B)) | /*..*/ |
| ((OPTION_C)) | – |
| ((OPTION_D)) | None of the above |
| ((CORRECT_CHOICE)) (A/B/C/D) | A |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | Which of the following statements is false? |
| ((OPTION_A)) | Every C++ program must have a main(). |
| ((OPTION_B)) | In C++, white spaces and carriage returns are ignored by the compiler. |
| ((OPTION_C)) | C++ statements terminate with semicolon. |
| ((OPTION_D)) | Main() terminates with semicolon. |
| ((CORRECT_CHOICE)) (A/B/C/D) | D |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | An identifier in C++ |
| ((OPTION_A)) | Must begin with a letter only |
| ((OPTION_B)) | Is not differentiated by cases |
| ((OPTION_C)) | Contains all characters as significant |
| ((OPTION_D)) | None of the above |
| ((CORRECT_CHOICE)) (A/B/C/D) | C |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | ………. Provides a value for a variable |
| ((OPTION_A)) | declaration statement |
| ((OPTION_B)) | assignment statement |
| ((OPTION_C)) | definition statement |
| ((OPTION_D)) | None of the above |
| ((CORRECT_CHOICE)) (A/B/C/D) | B |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | A collection of variables referred under one name |
| ((OPTION_A)) | Structure |
| ((OPTION_B)) | Class |
| ((OPTION_C)) | Union |
| ((OPTION_D)) | None of the above |
| ((CORRECT_CHOICE)) (A/B/C/D) | A |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | A memory location shared by two or more different variables |
| ((OPTION_A)) | Structure |
| ((OPTION_B)) | Class |
| ((OPTION_C)) | Union |
| ((OPTION_D)) | None of the above |
| ((CORRECT_CHOICE)) (A/B/C/D) | C |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | The constants defined using enum keyword are |
| ((OPTION_A)) | Symbols |
| ((OPTION_B)) | Enumerators |
| ((OPTION_C)) | Keywords |
| ((OPTION_D)) | None of the above |
| ((CORRECT_CHOICE)) (A/B/C/D) | B |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | The operator ?: is |
| ((OPTION_A)) | Logical operator |
| ((OPTION_B)) | Relational operator |
| ((OPTION_C)) | Conditional operator |
| ((OPTION_D)) | Arithmetic operator |
| ((CORRECT_CHOICE)) (A/B/C/D) | C |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | A loop containing other loop is |
| ((OPTION_A)) | Nested |
| ((OPTION_B)) | Inner |
| ((OPTION_C)) | Outer |
| ((OPTION_D)) | None of the above |
| ((CORRECT_CHOICE)) (A/B/C/D) | A |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | The following statement forces the next iteration of the loop to take place |
| ((OPTION_A)) | break |
| ((OPTION_B)) | continue |
| ((OPTION_C)) | goto |
| ((OPTION_D)) | None of the above |
| ((CORRECT_CHOICE)) (A/B/C/D) | B |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | gets() function is available in |
| ((OPTION_A)) | stdio.h |
| ((OPTION_B)) | string.h |
| ((OPTION_C)) | ctype.h |
| ((OPTION_D)) | stdlib.h |
| ((CORRECT_CHOICE)) (A/B/C/D) | A |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | In C++, the statements are enclosed within |
| ((OPTION_A)) | parenthesis |
| ((OPTION_B)) | square brackets |
| ((OPTION_C)) | curly brackets |
| ((OPTION_D)) | None of the above |
| ((CORRECT_CHOICE)) (A/B/C/D) | C |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | The following tells the compiler where the program begins |
| ((OPTION_A)) | Function prototype |
| ((OPTION_B)) | Forward declaration of class |
| ((OPTION_C)) | main() |
| ((OPTION_D)) | None of the above |
| ((CORRECT_CHOICE)) (A/B/C/D) | C |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | << operator is |
| ((OPTION_A)) | stream insertion operator |
| ((OPTION_B)) | stream extraction operator |
| ((OPTION_C)) | left shift operator |
| ((OPTION_D)) | None of the above |
| ((CORRECT_CHOICE)) (A/B/C/D) | A |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | Which of the following statements regarding comments is false? |
| ((OPTION_A)) | /*..*/ |
| ((OPTION_B)) | Comment beginning with // extends to the end of the line |
| ((OPTION_C)) | Comments may be nested |
| ((OPTION_D)) | Comments are used to describe a program |
| ((CORRECT_CHOICE)) (A/B/C/D) | C |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | C++ is |
| ((OPTION_A)) | Procedural programming language |
| ((OPTION_B)) | Structural programming language |
| ((OPTION_C)) | Object oriented programming language |
| ((OPTION_D)) | None of the above |
| ((CORRECT_CHOICE)) (A/B/C/D) | C |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | y=x=2; in C++ will result in |
| ((OPTION_A)) | compilation error |
| ((OPTION_B)) | runtime error |
| ((OPTION_C)) | assignment of value to x then to y |
| ((OPTION_D)) | None of the above |
| ((CORRECT_CHOICE)) (A/B/C/D) | C |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | In C++, ………. is the statement terminator |
| ((OPTION_A)) | semicolon |
| ((OPTION_B)) | colon |
| ((OPTION_C)) | new line |
| ((OPTION_D)) | None of the above |
| ((CORRECT_CHOICE)) (A/B/C/D) | A |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | Modules operator (%) has higher precedence than |
| ((OPTION_A)) | Divide (/) operator |
| ((OPTION_B)) | Multiply (*) operator |
| ((OPTION_C)) | Negation (unary minus) |
| ((OPTION_D)) | Bitwise left shift operator |
| ((CORRECT_CHOICE)) (A/B/C/D) | C |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | The result of the following statement is
int y = 7; int ans = ++y; cout<<”ans=”<<ans; cout<<”y”<<y; |
| ((OPTION_A)) | ans=7, y=7 |
| ((OPTION_B)) | ans=8,y=7 |
| ((OPTION_C)) | ans=8,y=8; |
| ((OPTION_D)) | none of the above |
| ((CORRECT_CHOICE)) (A/B/C/D) | C |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | The objects can directly access |
| ((OPTION_A)) | Public members |
| ((OPTION_B)) | Private members |
| ((OPTION_C)) | Both (a) & (b) |
| ((OPTION_D)) | None of the above |
| ((CORRECT_CHOICE)) (A/B/C/D) | A |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | Default argument is |
| ((OPTION_A)) | Specified in function definition |
| ((OPTION_B)) | Specified in function declaration |
| ((OPTION_C)) | Specified from left to right |
| ((OPTION_D)) | None of the above |
| ((CORRECT_CHOICE)) (A/B/C/D) | B |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | Consider the following if construct
If(x=0) cout<<”Inside loop!”; cout<<”Outside loop”; The result of the above code segment is. |
| ((OPTION_A)) | inside loop |
| ((OPTION_B)) | outside loop |
| ((OPTION_C)) | both (a) & (b) |
| ((OPTION_D)) | none of the above |
| ((CORRECT_CHOICE)) (A/B/C/D) | B |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | The result of 2 & 3 is |
| ((OPTION_A)) | 2 |
| ((OPTION_B)) | 3 |
| ((OPTION_C)) | 4 |
| ((OPTION_D)) | none of the above |
| ((CORRECT_CHOICE)) (A/B/C/D) | A |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | Which of the following statements regarding enumerators is false? |
| ((OPTION_A)) | Enumeration is an alternative method for naming integer constants/ |
| ((OPTION_B)) | An enumerator value can’t be changed in a program |
| ((OPTION_C)) | An integer value may be assigned to an enumerated variable |
| ((OPTION_D)) | An enum defined within a structure is local to the structure |
| ((CORRECT_CHOICE)) (A/B/C/D) | C |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | Which of the following statements is false? |
| ((OPTION_A)) | typedef defines new data types |
| ((OPTION_B)) | Using typedef does not replace the standard C++ data type name with the new name |
| ((OPTION_C)) | The new name defined by typedef, can be used as a type for another typedef |
| ((OPTION_D)) | None of the above |
| ((CORRECT_CHOICE)) (A/B/C/D) | A |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | Data members and member functions are enclosed within |
| ((OPTION_A)) | class |
| ((OPTION_B)) | structure |
| ((OPTION_C)) | union |
| ((OPTION_D)) | None of the above |
| ((CORRECT_CHOICE)) (A/B/C/D) | A |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | Inline functions are |
| ((OPTION_A)) | a) Declared in the class defined outside the class |
| ((OPTION_B)) | b) Defined outside the class using keyword intime |
| ((OPTION_C)) | c) Defined inside the class using keyword inline |
| ((OPTION_D)) | d) None of the above |
| ((CORRECT_CHOICE)) (A/B/C/D) | B |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | The default class access scope is |
| ((OPTION_A)) | a) Private |
| ((OPTION_B)) | b) Public |
| ((OPTION_C)) | c) Protected |
| ((OPTION_D)) | d) None of the above |
| ((CORRECT_CHOICE)) (A/B/C/D) | A |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | The default scope for a structure is |
| ((OPTION_A)) | a) Private |
| ((OPTION_B)) | b) Public |
| ((OPTION_C)) | c) Protected |
| ((OPTION_D)) | d) None of the above |
| ((CORRECT_CHOICE)) (A/B/C/D) | B |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | The private data members of a class are accessible |
| ((OPTION_A)) | a) Directly to objects of that class |
| ((OPTION_B)) | b) Only to the member functions |
| ((OPTION_C)) | c) To any function defined outside a class |
| ((OPTION_D)) | d) None of the above |
| ((CORRECT_CHOICE)) (A/B/C/D) | B |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | The following is a valid statement in C++ |
| ((OPTION_A)) | a) int x=(int)2.50; |
| ((OPTION_B)) | b) int x=int(2.50); |
| ((OPTION_C)) | c) Both (a) & (b) |
| ((OPTION_D)) | d) None of the above |
| ((CORRECT_CHOICE)) (A/B/C/D) | C |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | Which of the following operator can be overloaded |
| ((OPTION_A)) | a) Member access operator ( . & .*) |
| ((OPTION_B)) | b) Conditional operator (?:) |
| ((OPTION_C)) | c) Scope resolution operator (::) |
| ((OPTION_D)) | d) None of the above |
| ((CORRECT_CHOICE)) (A/B/C/D) | D |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | Using same function name to perform different tasks is |
| ((OPTION_A)) | a) Function polymorphism |
| ((OPTION_B)) | b) Runtime polymorphism |
| ((OPTION_C)) | c) Function prototype |
| ((OPTION_D)) | d) None of the above |
| ((CORRECT_CHOICE)) (A/B/C/D) | A |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | What is wrong with the following statement? |
| ((OPTION_A)) | float s_interest (float principal, int rate=0.25, int time); |
| ((OPTION_B)) | a) variables must not be specified in function prototype |
| ((OPTION_C)) | b) arguments may only be defaulted from right to left |
| ((OPTION_D)) | c) the default value must be specified when making a function call |
| ((CORRECT_CHOICE)) (A/B/C/D) | B |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | Which of the following statements regarding function overloading is not true. |
| ((OPTION_A)) | a) If is used to handle different data types at one place |
| ((OPTION_B)) | b) When making a function call, if no exact match is found, promotion is the only criteria to find a match. |
| ((OPTION_C)) | c) The default arguments can not be used instead of overloading |
| ((OPTION_D)) | d) Unrelated functions should not be overloaded |
| ((CORRECT_CHOICE)) (A/B/C/D) | C |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | |
| ((OPTION_A)) | |
| ((OPTION_B)) | |
| ((OPTION_C)) | |
| ((OPTION_D)) | |
| ((CORRECT_CHOICE)) (A/B/C/D) | |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | The private members of a class implement the OOP concept of |
| ((OPTION_A)) | a) Data abstraction |
| ((OPTION_B)) | b) Data hiding |
| ((OPTION_C)) | c) Message passing |
| ((OPTION_D)) | d) None of the above |
| ((CORRECT_CHOICE)) (A/B/C/D) | B |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | When a member function of a class call another member function, it is |
| ((OPTION_A)) | a) Nesting of classes |
| ((OPTION_B)) | b) Nesting of functions |
| ((OPTION_C)) | c) Nesting of objects |
| ((OPTION_D)) | d) None of the above |
| ((CORRECT_CHOICE)) (A/B/C/D) | B |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | A function defined inside a class is called |
| ((OPTION_A)) | a) A class function |
| ((OPTION_B)) | b) A friend function |
| ((OPTION_C)) | c) A member function |
| ((OPTION_D)) | d) None of the above |
| ((CORRECT_CHOICE)) (A/B/C/D) | C |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | Information is made shareable through |
| ((OPTION_A)) | a) inheritance |
| ((OPTION_B)) | b) data encapsulation |
| ((OPTION_C)) | c) data abstraction |
| ((OPTION_D)) | d) none of the above |
| ((CORRECT_CHOICE)) (A/B/C/D) | A |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | Functions can returns |
| ((OPTION_A)) | a) arrays |
| ((OPTION_B)) | b) reference |
| ((OPTION_C)) | c) object |
| ((OPTION_D)) | d) all of the above |
| ((CORRECT_CHOICE)) (A/B/C/D) | D |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | The memory for date members is allocated |
| ((OPTION_A)) | a) When a class is defined |
| ((OPTION_B)) | b) When an object is initialized |
| ((OPTION_C)) | c) When an object is created |
| ((OPTION_D)) | d) None of the above |
| ((CORRECT_CHOICE)) (A/B/C/D) | B |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | The memory for member functions is allocated |
| ((OPTION_A)) | a) When a class is defined |
| ((OPTION_B)) | b) When a object is created |
| ((OPTION_C)) | c) When an object is initialized |
| ((OPTION_D)) | d) None of the above |
| ((CORRECT_CHOICE)) (A/B/C/D) | A |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | The dot operator relates |
| ((OPTION_A)) | a) A class member and a class object |
| ((OPTION_B)) | b) A class object and a class |
| ((OPTION_C)) | c) A class and a member of that class |
| ((OPTION_D)) | d) A class object and member of that class |
| ((CORRECT_CHOICE)) (A/B/C/D) | D |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | A class having another class definition is |
| ((OPTION_A)) | a) Nested class |
| ((OPTION_B)) | b) Subordinate class |
| ((OPTION_C)) | c) Enclosing class |
| ((OPTION_D)) | d) None of the above |
| ((CORRECT_CHOICE)) (A/B/C/D) | C |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | A class whose member functions are friends of other class is |
| ((OPTION_A)) | a) Friend class |
| ((OPTION_B)) | b) Abstract class |
| ((OPTION_C)) | c) Virtual class |
| ((OPTION_D)) | d) None of the above |
| ((CORRECT_CHOICE)) (A/B/C/D) | A |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | The data members of a class are initialized |
| ((OPTION_A)) | a) in class definition |
| ((OPTION_B)) | b) by a non-member function |
| ((OPTION_C)) | c) through constructor function when a class object is created |
| ((OPTION_D)) | d) none of the above |
| ((CORRECT_CHOICE)) (A/B/C/D) | C |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | A constructor function is |
| ((OPTION_A)) | a) A friend function to a class |
| ((OPTION_B)) | b) A member function with the same name as its class |
| ((OPTION_C)) | c) A non-member function |
| ((OPTION_D)) | d) None of the above |
| ((CORRECT_CHOICE)) (A/B/C/D) | B |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | An enumerated type is composed of |
| ((OPTION_A)) | a) Integer values with user defined name |
| ((OPTION_B)) | b) Variables of different data types |
| ((OPTION_C)) | c) Constant numeric values |
| ((OPTION_D)) | d) None of the above |
| ((CORRECT_CHOICE)) (A/B/C/D) | A |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | In C++, the arguments by default are passed by |
| ((OPTION_A)) | a) call be reference |
| ((OPTION_B)) | b) call be value |
| ((OPTION_C)) | c) both (a) & (b) |
| ((OPTION_D)) | d) none of the above |
| ((CORRECT_CHOICE)) (A/B/C/D) | B |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | is an example of |
| ((OPTION_A)) | a) unary operator |
| ((OPTION_B)) | b) binary operator |
| ((OPTION_C)) | c) ternary operator |
| ((OPTION_D)) | d) none of the above |
| ((CORRECT_CHOICE)) (A/B/C/D) | C |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | new operator is used |
| ((OPTION_A)) | a) to define a new variable |
| ((OPTION_B)) | b) to create a new data type |
| ((OPTION_C)) | c) to allocate memory dynamically |
| ((OPTION_D)) | d) none of the above |
| ((CORRECT_CHOICE)) (A/B/C/D) | C |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | A constructor function is generally defined |
| ((OPTION_A)) | a) In the public section of a class |
| ((OPTION_B)) | b) In the private section of a class |
| ((OPTION_C)) | c) In the protected section of a class |
| ((OPTION_D)) | d) None of the above |
| ((CORRECT_CHOICE)) (A/B/C/D) | A |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | A class having no public constructors is |
| ((OPTION_A)) | a) A private class |
| ((OPTION_B)) | b) A public class |
| ((OPTION_C)) | c) An abstract class |
| ((OPTION_D)) | d) None of the above |
| ((CORRECT_CHOICE)) (A/B/C/D) | A |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | If a constructor function is defined in private section of a class, then |
| ((OPTION_A)) | a) The object cannot be created |
| ((OPTION_B)) | b) Only member functions and friends may declare objects of the class |
| ((OPTION_C)) | c) Both (a) & (b) |
| ((OPTION_D)) | d) None of the above |
| ((CORRECT_CHOICE)) (A/B/C/D) | C |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | A constructor with no argument is |
| ((OPTION_A)) | a) Default constructor |
| ((OPTION_B)) | b) Parameterized constructor |
| ((OPTION_C)) | c) Copy constructor |
| ((OPTION_D)) | d) None of the above |
| ((CORRECT_CHOICE)) (A/B/C/D) | A |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | If default arguments are provided to a constructor function, then it becomes |
| ((OPTION_A)) | a) Default constructor |
| ((OPTION_B)) | b) Copy instructor |
| ((OPTION_C)) | c) Parameterized constructor |
| ((OPTION_D)) | d) None of the above |
| ((CORRECT_CHOICE)) (A/B/C/D) | A |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | The class of which the objects are not instantiated is |
| ((OPTION_A)) | a) Abstract class |
| ((OPTION_B)) | b) Virtual class |
| ((OPTION_C)) | c) Static class |
| ((OPTION_D)) | d) None of the above |
| ((CORRECT_CHOICE)) (A/B/C/D) | A |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | && denotes |
| ((OPTION_A)) | a) logical OR |
| ((OPTION_B)) | b) logical AND |
| ((OPTION_C)) | c) Bitwise AND |
| ((OPTION_D)) | d) None of the above |
| ((CORRECT_CHOICE)) (A/B/C/D) | B |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | ) The parameterized constructor |
| ((OPTION_A)) | a) Needs initial values as arguments during creation of an object |
| ((OPTION_B)) | b) Can be invoked explicitly only |
| ((OPTION_C)) | c) Can be invoked implicitly only |
| ((OPTION_D)) | d) None of the above |
| ((CORRECT_CHOICE)) (A/B/C/D) | A |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | Explicit call to a constructor means |
| ((OPTION_A)) | a) Providing the constructor name explicitly to invoke it |
| ((OPTION_B)) | b) Not providing the construction name at all |
| ((OPTION_C)) | c) Is the shorthand method |
| ((OPTION_D)) | d) None of the above |
| ((CORRECT_CHOICE)) (A/B/C/D) | A |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | Classes in C++ are |
| ((OPTION_A)) | a) Fundamental data type |
| ((OPTION_B)) | b) Primitive data type |
| ((OPTION_C)) | c) Desired data type |
| ((OPTION_D)) | d) None of the above |
| ((CORRECT_CHOICE)) (A/B/C/D) | C |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | A copy constructor is called |
| ((OPTION_A)) | a) When an object is defined and initialized with another object |
| ((OPTION_B)) | b) When an object is passed by value |
| ((OPTION_C)) | c) When a function returns an object |
| ((OPTION_D)) | d) All of the above |
| ((CORRECT_CHOICE)) (A/B/C/D) | D |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | Which of the following regarding constructor function is false? |
| ((OPTION_A)) | a) Constructor functions don’t have return type, not even void |
| ((OPTION_B)) | b) Constructors can’t be inherited |
| ((OPTION_C)) | c) We can refer to their addresses |
| ((OPTION_D)) | d) Constructors cannot be virtual |
| ((CORRECT_CHOICE)) (A/B/C/D) | C |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | If new operator is used, then the constructor function is |
| ((OPTION_A)) | a) Parameterized constructor |
| ((OPTION_B)) | b) Copy constructor |
| ((OPTION_C)) | c) Dynamic constructor |
| ((OPTION_D)) | d) Default constructor |
| ((CORRECT_CHOICE)) (A/B/C/D) | C |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | Which of the following statements regarding constructor is false? |
| ((OPTION_A)) | a) A constructor may be defined static |
| ((OPTION_B)) | b) Constructor can have default arguments |
| ((OPTION_C)) | c) Member functions may be invoked from within a constructor |
| ((OPTION_D)) | d) None of the above |
| ((CORRECT_CHOICE)) (A/B/C/D) | A |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | The antonym of constructor is |
| ((OPTION_A)) | a) Creator |
| ((OPTION_B)) | b) Destructor |
| ((OPTION_C)) | c) Destroyer |
| ((OPTION_D)) | d) None of the above |
| ((CORRECT_CHOICE)) (A/B/C/D) | B |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | Variable …………. of void type |
| ((OPTION_A)) | a) May be declared |
| ((OPTION_B)) | b) Cannot be declared |
| ((OPTION_C)) | c) Can be initialized |
| ((OPTION_D)) | d) None of the above |
| ((CORRECT_CHOICE)) (A/B/C/D) | B |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | A destruction function |
| ((OPTION_A)) | a) Takes no argument and has no return type not even void |
| ((OPTION_B)) | b) Has name similar to that of class, preceded by tilde(~) symbol |
| ((OPTION_C)) | c) Is used to destruct an object, constructed through constructor function |
| ((OPTION_D)) | d) All of the above |
| ((CORRECT_CHOICE)) (A/B/C/D) | D |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | Which of the following statements regarding destructor function is false? |
| ((OPTION_A)) | a) Destructors do not accept any arguments, nor do they return any values |
| ((OPTION_B)) | b) Destructors can be inherited |
| ((OPTION_C)) | c) Member functions may be called from within a destructor |
| ((OPTION_D)) | d) Destructor functions are called automatically when an object is destroyed |
| ((CORRECT_CHOICE)) (A/B/C/D) | B |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | Function overloading |
| ((OPTION_A)) | a) Involves several function definitions under one name, but different argument types |
| ((OPTION_B)) | b) Implements polymorphism |
| ((OPTION_C)) | c) Reduces the number of comparison in a program, hence increases the execution speed of a program |
| ((OPTION_D)) | d) All of the above |
| ((CORRECT_CHOICE)) (A/B/C/D) | D |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | The signature of function is |
| ((OPTION_A)) | a) The number & type of arguments |
| ((OPTION_B)) | b) The return type of a function |
| ((OPTION_C)) | c) The class definition |
| ((OPTION_D)) | d) None of the above |
| ((CORRECT_CHOICE)) (A/B/C/D) | A |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | Overloading of constructor function |
| ((OPTION_A)) | a) is similar to function overloading |
| ((OPTION_B)) | b) different from an overloaded function as it can’t return a value |
| ((OPTION_C)) | c) not permitted in C++ |
| ((OPTION_D)) | d) none of the above |
| ((CORRECT_CHOICE)) (A/B/C/D) | B |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | The binding of a function call at runtime is |
| ((OPTION_A)) | a) Static binding |
| ((OPTION_B)) | b) Early binding |
| ((OPTION_C)) | c) Late binding |
| ((OPTION_D)) | d) Runtime binding |
| ((CORRECT_CHOICE)) (A/B/C/D) | C |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | The process of giving special meaning to an operator is |
| ((OPTION_A)) | a) Operator overloading |
| ((OPTION_B)) | b) Operator mechanism |
| ((OPTION_C)) | c) Operator definition |
| ((OPTION_D)) | d) None of the above |
| ((CORRECT_CHOICE)) (A/B/C/D) | A |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | What is a comment in c++? |
| ((OPTION_A)) | a) comments are parts of the source code disregarded by the compiler |
| ((OPTION_B)) | b) comments are executed by compiler to find the meaning of the comment |
| ((OPTION_C)) | c) comments are executable |
| ((OPTION_D)) | d) none of the mentioned |
| ((CORRECT_CHOICE)) (A/B/C/D) | A |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | What type of comments does c++ support? |
| ((OPTION_A)) | a) single line |
| ((OPTION_B)) | b) multi line |
| ((OPTION_C)) | c) single line and multi line |
| ((OPTION_D)) | d) none of the mentioned |
| ((CORRECT_CHOICE)) (A/B/C/D) | C |
| ((MARKS)) (1/2/3…) | 1 |
| ((QUESTION)) | What is the use of the indentation in c++? |
| ((OPTION_A)) | a) distinguishes between comments and code |
| ((OPTION_B)) | b) r distinguishes between comments and outer data |
| ((OPTION_C)) | c) both a and b |
| ((OPTION_D)) | d) none of the mentioned |
| ((CORRECT_CHOICE)) (A/B/C/D) | A |