MCQOPTIONS
 Saved Bookmarks
				This section includes 18 Mcqs, each offering curated multiple-choice questions to sharpen your Career Aptitude Test knowledge and support exam preparation. Choose a topic below to get started.
| 1. | 
                                    Use of preprocessor directive in OOP | 
                            
| A. | for conditional compilation | 
| B. | for macro expansion | 
| C. | error and warning reporting | 
| D. | all the above | 
| Answer» E. | |
| 2. | 
                                    Overloaded methods in java | 
                            
| A. | Compiler uses method signature to determine which method to invoke. They may have different functionality | 
| B. | They are not available in fundamental classes | 
| C. | They have the same name and signature | 
| D. | none | 
| Answer» B. They are not available in fundamental classes | |
| 3. | 
                                    A copy constructor is called | 
                            
| A. | when an object is returned by value | 
| B. | when an object is passed by value as an argument | 
| C. | when compiler generates a temporary object | 
| D. | all the above | 
| Answer» E. | |
| 4. | 
                                    Abstract class vs Interface | 
                            
| A. | A class may inherit only one abstract class but may inherit several interfaces. | 
| B. | An abstract class can provide complete and default code but an interface has no code | 
| C. | both a and b | 
| D. | none | 
| Answer» D. none | |
| 5. | 
                                    Constructor chaining is | 
                            
| A. | subclass constructor calling super class constructor | 
| B. | super class constructor calling subclass constructor | 
| C. | both | 
| D. | none | 
| Answer» B. super class constructor calling subclass constructor | |
| 6. | 
                                    Which Java.Lang contains only static methods? | 
                            
| A. | Math ,System | 
| B. | Number,Exception | 
| C. | There is no such class | 
| D. | none | 
| Answer» B. Number,Exception | |
| 7. | 
                                    Fallthrough in a switch case statement | 
                            
| A. | prevents the next case after the matching block to be executed | 
| B. | Allows the next case after the matching block to be executed | 
| C. | no fallthorugh occurs in switch case | 
| D. | none | 
| Answer» C. no fallthorugh occurs in switch case | |
| 8. | 
                                    Virtual keyword is used | 
                            
| A. | to remove static linkages | 
| B. | to call function based on kind of object it is being called for | 
| C. | to call the methods that don't exist at compile time | 
| D. | all the above | 
| Answer» E. | |
| 9. | 
                                    Invoking methods characteristics | 
                            
| A. | methods can be invoked in any order and calling method should be in same class as worker method | 
| B. | Worker method and calling method can be invoked in same way | 
| C. | Any method can call any method | 
| D. | all the above | 
| Answer» B. Worker method and calling method can be invoked in same way | |
| 10. | 
                                    Break statement in switch case | 
                            
| A. | prevents from fallthrough | 
| B. | causes an exit from innermost loop | 
| C. | both a and b | 
| D. | none | 
| Answer» D. none | |
| 11. | 
                                    An Abstract class | 
                            
| A. | allows normal method declaration within | 
| B. | can be instantiated | 
| C. | Must have abstract methods with implemetation within | 
| D. | none | 
| Answer» B. can be instantiated | |
| 12. | 
                                    Dynamic dispatch is a feature that | 
                            
| A. | selects which polymorphic operation to call at run time | 
| B. | selects which polymorphic operation to call at compile time | 
| C. | Both a and b | 
| D. | None | 
| Answer» B. selects which polymorphic operation to call at compile time | |
| 13. | 
                                    Why is user defined copy constructor required? | 
                            
| A. | there is no implicit copy constructor in C++ | 
| B. | when pointers are involved implicit copy constructor does not give correct result | 
| C. | both a and b | 
| D. | none | 
| Answer» C. both a and b | |
| 14. | 
                                    Pure virtual function is used | 
                            
| A. | to give meaning to derived class function | 
| B. | to give meaning to base class function | 
| C. | to initialize all functions | 
| D. | None | 
| Answer» C. to initialize all functions | |
| 15. | 
                                    Function Templates can have | 
                            
| A. | Explicit instantiation definition with template argument for all parameters | 
| B. | explicit instantiation of declaration with template argument for all parameters | 
| C. | Both a and b | 
| D. | None | 
| Answer» D. None | |
| 16. | 
                                    Encapsulation helps | 
                            
| A. | information hiding | 
| B. | in providing low coupling | 
| C. | in providing high cohesion | 
| D. | All the above | 
| Answer» E. | |
| 17. | 
                                    The keyword 'this' is used | 
                            
| A. | As reference to current object | 
| B. | Explicit constructor invocation | 
| C. | In open recursion | 
| D. | All the above | 
| Answer» E. | |
| 18. | 
                                    Function templates are considered equivalent when | 
                            
| A. | Declared in same scope | 
| B. | Having same name | 
| C. | Having identical return type and parameter list | 
| D. | All of the above | 
| Answer» E. | |