MCQOPTIONS
Saved Bookmarks
This section includes 916 Mcqs, each offering curated multiple-choice questions to sharpen your Technical Programming knowledge and support exam preparation. Choose a topic below to get started.
| 851. |
Which problem may arise if we use abstract class functions for polymorphism? |
| A. | All classes are converted as abstract class |
| B. | Derived class must be of abstract type |
| C. | All the derived classes must implement the undefined functions |
| D. | Derived classes can’t redefine the function |
| Answer» D. Derived classes can’t redefine the function | |
| 852. |
Polymorphism is possible in C language. |
| A. | True |
| B. | False |
| Answer» B. False | |
| 853. |
Which among the following can’t be used for polymorphism? |
| A. | Static member functions |
| B. | Member functions overloading |
| C. | Predefined operator overloading |
| D. | Constructor overloading |
| Answer» B. Member functions overloading | |
| 854. |
In case of using abstract class or function overloading, which function is supposed to be called first? |
| A. | Local function |
| B. | Function with highest priority in compiler |
| C. | Global function |
| D. | Function with lowest priority because it might have been halted since long time, because of low priority |
| Answer» C. Global function | |
| 855. |
Which type of function among the following shows polymorphism? |
| A. | Inline function |
| B. | Virtual function |
| C. | Undefined functions |
| D. | Class member functions |
| Answer» C. Undefined functions | |
| 856. |
If same message is passed to objects of several different classes and all of those can respond in a different way, what is this feature called? |
| A. | Inheritance |
| B. | Overloading |
| C. | Polymorphism |
| D. | Overriding |
| Answer» D. Overriding | |
| 857. |
Which among the following is the language which supports classes but not polymorphism? |
| A. | SmallTalk |
| B. | Java |
| C. | C++ |
| D. | Ada |
| Answer» E. | |
| 858. |
What do you call the languages that support classes but not polymorphism? |
| A. | Class based language |
| B. | Procedure Oriented language |
| C. | Object-based language |
| D. | If classes are supported, polymorphism will always be supported |
| Answer» D. If classes are supported, polymorphism will always be supported | |
| 859. |
Which among the following best describes polymorphism? |
| A. | It is the ability for a message/data to be processed in more than one form |
| B. | It is the ability for a message/data to be processed in only 1 form |
| C. | It is the ability for many messages/data to be processed in one way |
| D. | It is the ability for undefined message/data to be processed in at least one way |
| Answer» B. It is the ability for a message/data to be processed in only 1 form | |
| 860. |
OOP provides better security than POP: |
| A. | Always true for any programming language |
| B. | May not be true with respect to all programming languages |
| C. | It depends on type of program |
| D. | It’s vice-versa is true |
| Answer» B. May not be true with respect to all programming languages | |
| 861. |
Which among the following, for a pure OOP language, is true? |
| A. | The language should follow 3 or more features of OOP |
| B. | The language should follow at least 1 feature of OOP |
| C. | The language must follow only 3 features of OOP |
| D. | The language must follow all the rules of OOP |
| Answer» E. | |
| 862. |
Exception handling is feature of OOP. (True/False) |
| A. | true |
| B. | False |
| Answer» B. False | |
| 863. |
Which among doesn’t illustrates polymorphism? |
| A. | Function overloading |
| B. | Function overloading |
| C. | Operator overloading |
| D. | Virtual function |
| Answer» C. Operator overloading | |
| 864. |
Which feature in OOP is used to allocate additional function to a predefined operator in any language? |
| A. | Operator Overloading |
| B. | Function Overloading |
| C. | Operator Overriding |
| D. | Function Overriding |
| Answer» B. Function Overloading | |
| 865. |
___________ underlines the feature of Polymorphism in a class. |
| A. | Nested class |
| B. | Enclosing class |
| C. | Inline function |
| D. | Virtual Function |
| Answer» E. | |
| 866. |
The feature by which one object can interact with another object is: |
| A. | Data transfer |
| B. | Data Binding |
| C. | Message Passing |
| D. | Message reading |
| Answer» D. Message reading | |
| 867. |
How many basic features of OOP are required for a programming language to be purely OOP? |
| A. | 7 |
| B. | 6 |
| C. | 5 |
| D. | 4 |
| Answer» B. 6 | |
| 868. |
Which feature may be violated if we don’t use classes in a program? |
| A. | Inheritance can’t be implemented |
| B. | Object must be used is violated |
| C. | Encapsulation only is violated |
| D. | Basically all the features of OOP gets violated |
| Answer» E. | |
| 869. |
Which among the following doesn’t come under OOP concept? |
| A. | Platform independent |
| B. | Data binding |
| C. | Message passing |
| D. | Data hiding |
| Answer» B. Data binding | |
| 870. |
Which of the following is not feature of pure OOP? |
| A. | Classes must be used |
| B. | Inheritance |
| C. | Data may/may not be declared using object |
| D. | Functions Overloading |
| Answer» D. Functions Overloading | |
| 871. |
If different properties and functions of a real world entity is grouped or embedded into a single element, what is it called in OOP language? |
| A. | Inheritance |
| B. | Polymorphism |
| C. | Abstraction |
| D. | Encapsulation |
| Answer» E. | |
| 872. |
If a function can perform more than 1 type of tasks, where the function name remains same, which feature of OOP is used here? |
| A. | Encapsulation |
| B. | Inheritance |
| C. | Polymorphism |
| D. | Abstraction |
| Answer» D. Abstraction | |
| 873. |
Which feature of OOP indicates code reusability? |
| A. | Encapsulation |
| B. | Inheritance |
| C. | Abstraction |
| D. | Abstraction |
| Answer» C. Abstraction | |
| 874. |
Object can’t be used with pointers because they belong to user defined class, and compiler can’t decide the type of data may be used inside the class. (True/False) |
| A. | true |
| B. | False |
| Answer» C. | |
| 875. |
Which among the following is correct? |
| A. | class student{ }s1,s2; s1.student()=s2.student(); |
| B. | class student{ }s1; class topper{ }t1; s1=t1; |
| C. | class student{ }s1,s2; s1=s2; |
| D. | Class student{ }s1; class topper{ }t1; s1.student()=s2.topper(); |
| Answer» D. Class student{ }s1; class topper{ }t1; s1.student()=s2.topper(); | |
| 876. |
When an object is returned___________ |
| A. | A temporary object is created to return the value |
| B. | The same object used in function is used to return the value |
| C. | The Object can be returned without creation of temporary object |
| D. | Object are returned implicitly, we can’t say how it happens inside program |
| Answer» B. The same object used in function is used to return the value | |
| 877. |
Object declared in main() function: |
| A. | Can be used by any other function |
| B. | Can be used by main() function of any other program |
| C. | Can’t be used by any other function |
| D. | Can be accessed using scope resolution operator |
| Answer» D. Can be accessed using scope resolution operator | |
| 878. |
Which among the following is wrong? |
| A. | class student{ }; student s; |
| B. | class student{ }; student s; |
| C. | abstract class student{ }s[50000000]; |
| D. | abstract class student{ }; class toppers: public student{ }; topper t; |
| Answer» C. abstract class student{ }s[50000000]; | |
| 879. |
If a local class is defined in a function, which of the following is true for an object of that class? |
| A. | Object is accessible outside the function |
| B. | Object can be declared inside any other function |
| C. | Object can be used to call other class members |
| D. | Object can be used/accessed/declared locally in that function. |
| Answer» E. | |
| 880. |
How members of an object are accessed? |
| A. | Using dot operator/period symbol |
| B. | Using scope resolution operator |
| C. | Using member names directly |
| D. | Using pointer only |
| Answer» B. Using scope resolution operator | |
| 881. |
Functions can’t return objects. (True/False) |
| A. | True |
| B. | False |
| Answer» C. | |
| 882. |
What is size of the object of following class (64 bit system)? class student { int rollno; char name[20]; static int studentno; }; |
| A. | 20 |
| B. | 22 |
| C. | 24 |
| D. | 28 |
| Answer» D. 28 | |
| 883. |
The object can’t be: |
| A. | Passed by reference |
| B. | Passed by value |
| C. | Passed by copy |
| D. | Passed as function |
| Answer» E. | |
| 884. |
Which of the following is incorrect? |
| A. | class student{ }s; |
| B. | class student{ }; student s; |
| C. | class student{ }s[]; |
| D. | class student{ }; student s[5]; |
| Answer» D. class student{ }; student s[5]; | |
| 885. |
Which among the following is false? |
| A. | Object must be created before using members of a class |
| B. | Memory for an object is allocated only after its constructor is called |
| C. | Objects can’t be passed by reference |
| D. | Objects can’t be passed by reference |
| Answer» D. Objects can’t be passed by reference | |
| 886. |
How many objects can be declared of a specific class in a single program? |
| A. | 32768 |
| B. | 127 |
| C. | 7 |
| D. | As many as you want |
| Answer» E. | |
| 887. |
Which definition best describes an object? |
| A. | Instance of a class |
| B. | Instance of itself |
| C. | Child of a class |
| D. | Overview of a class |
| Answer» B. Instance of itself | |
| 888. |
Instance of which type of class can’t be created? |
| A. | Anonymous class |
| B. | Nested class |
| C. | Parent class |
| D. | Abstract class |
| Answer» E. | |
| 889. |
Which among the following is false for class features? |
| A. | Classes may/may not have both data members and member functions |
| B. | Class definition must be ended with a colon |
| C. | Class can have only member functions with no data members |
| D. | Class is similar to union and structures |
| Answer» C. Class can have only member functions with no data members | |
| 890. |
Which of the following pairs are similar? |
| A. | Class and object |
| B. | Class and object |
| C. | Structure and object |
| D. | Structure and functions |
| Answer» C. Structure and object | |
| 891. |
Which syntax for class definition is wrong? |
| A. | class student{ }; |
| B. | student class{ }; |
| C. | class student{ public: student(int a){ } }; |
| D. | class student{ student(int a){} }; |
| Answer» C. class student{ public: student(int a){ } }; | |
| 892. |
Which among the following is false, for member function of a class? |
| A. | All member functions must be defined |
| B. | Member functions can be defined inside or outside the class body |
| C. | Member functions need not be declared inside the class definition |
| D. | Member functions can be made friend to another class using friend keyword |
| Answer» D. Member functions can be made friend to another class using friend keyword | |
| 893. |
Class with main() function can be inherited (True/False) |
| A. | true |
| B. | False |
| Answer» B. False | |
| 894. |
What is scope of a class nested inside another class? |
| A. | Protected scope |
| B. | Private scope |
| C. | Global scope |
| D. | Depends on access specifier and inheritance used |
| Answer» E. | |
| 895. |
Which of the following describes a friend class? |
| A. | Friend class can access all the private members of the class, of which it is a friend |
| B. | Friend class can only access protected members of the class, of which it is a friend |
| C. | Friend class don’t have any implementation |
| D. | Friend class can’t access any data member of another class but can use it’s methods |
| Answer» B. Friend class can only access protected members of the class, of which it is a friend | |
| 896. |
Which class can have member functions without their implementation? |
| A. | Default class |
| B. | String class |
| C. | Template class |
| D. | Abstract class |
| Answer» E. | |
| 897. |
Size of a class is : |
| A. | Sum of size of all the variables declared inside the class |
| B. | Sum of size of all the variables along with inherited variables in the class |
| C. | Size of largest size of variable |
| D. | Classes doesn’t have any size |
| Answer» E. | |
| 898. |
Which is known as generic class? |
| A. | Abstract class |
| B. | Final class |
| C. | Template class |
| D. | Efficient Code |
| Answer» D. Efficient Code | |
| 899. |
What is default access specifier for data members or member functions declared within a class without any specifier, in C++ ? |
| A. | Private |
| B. | Protected |
| C. | Public |
| D. | Depends on compiler |
| Answer» B. Protected | |
| 900. |
Class is pass by ______ |
| A. | Value |
| B. | Reference |
| C. | Value or Reference, depending on program |
| D. | Copy |
| Answer» C. Value or Reference, depending on program | |