MCQOPTIONS
Saved Bookmarks
This section includes 657 Mcqs, each offering curated multiple-choice questions to sharpen your Testing Subject knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
The constructor without parameter is called? |
| A. | Method Constructor |
| B. | Default Constructor |
| C. | Operator Constructor |
| D. | Function Constructor |
| Answer» C. Operator Constructor | |
| 2. |
________ is a default access specifier for members of structures in C++. |
| A. | protected |
| B. | public |
| C. | private |
| D. | default |
| Answer» C. private | |
| 3. |
________ is a default access specifier for members of class in C++. |
| A. | protected |
| B. | public |
| C. | private |
| D. | default |
| Answer» D. default | |
| 4. |
Observe the following code and chose the correct statement(s) class Name { const char *s ; . }; class Table { Name *p; size_t sz ; public : Table(size_ts = 15) {p = new Name [sz = s]; } ~Table() {delete [ ]p ;} Name * lookup(const char *); bool insert(Name *); }; |
| A. | ~Table() is a destructor |
| B. | p is of Table type |
| C. | Both A and B |
| D. | insert() is a method which returns nothing |
| Answer» B. p is of Table type | |
| 5. |
The content of accumulator is 1000 0000 what will be its content after RR A instruction? |
| A. | 0000 0001 |
| B. | 0000 0000 |
| C. | 0100 0000 |
| D. | 0000 0010 |
| Answer» D. 0000 0010 | |
| 6. |
Which is better computing time (in analysis of algorithm) ? |
| A. | O(N) |
| B. | O(2N) |
| C. | O(log2 N) |
| D. | O(N log2 N) |
| Answer» D. O(N log2 N) | |
| 7. |
Suppose in a microprocessor the instruction MVI A, 32H takes 2 machine cycles one is op code fetch which composed of 4 T-states and the other is memory read which takes n T-states. If the total time taken by the processor to execute the instruction is 1400 nano sec with an operating frequency of 5 MHz. What is the value of n? |
| A. | 3 |
| B. | 4 |
| C. | 6 |
| D. | 5 |
| Answer» B. 4 | |
| 8. |
Analyse the following code snippet and choose the answer:- #include Class Temp { private: int m_ival; public: Temp() { Cout<<"OBJECT CREATED\n"< } ~Temp() { Cout<<"OBJECT DESTROYED\n"< } }; void fnRead() { Temp oTempObj; } int main() { fnRead(); cout<<"IN MAIN \n"< return 0; } |
| A. | OBJECT CREATED OBJECT DESTROYED |
| B. | OBJECT CREATED OBJECT DESTROYED IN MAIN |
| C. | OBJECT CREATED IN MAIN |
| D. | Compilation Error |
| Answer» C. OBJECT CREATED IN MAIN | |
| 9. |
Declare the following statement?"A pointer to a function which receives nothing and returns nothing". |
| A. | void*(ptr)*int; |
| B. | void *(*ptr)() |
| C. | void *(*ptr)(*) |
| D. | void (*ptr)() |
| Answer» E. | |
| 10. |
A collection of wires that connects several devices is called? |
| A. | Link |
| B. | Bus |
| C. | Bi-directional |
| D. | Cables |
| Answer» C. Bi-directional | |
| 11. |
A modem is connected in between a telephone line and a? |
| A. | Network |
| B. | Computer |
| C. | Communicationadapter |
| D. | Serial port |
| Answer» D. Serial port | |
| 12. |
What is the CCITT standard for a T3? |
| A. | 2 multiplexedT1s |
| B. | 4 MultiplexedT1s |
| C. | 2 multiplexedT2s |
| D. | 4 multiplexedT2s |
| Answer» E. | |
| 13. |
Java is designed for the distributed environment of the Internet,because it handles _______ protocols? |
| A. | UDP |
| B. | TCP/IP |
| C. | FTP |
| D. | TEL |
| Answer» C. FTP | |
| 14. |
Java is associated with _______ programming Language? |
| A. | Oak |
| B. | Basic |
| C. | C |
| D. | Perl |
| Answer» B. Basic | |
| 15. |
Java has the capability to handle? |
| A. | InternetProtocol |
| B. | Transmission |
| C. | TCP |
| D. | Above of these |
| Answer» E. | |
| 16. |
In Java 31%9 gives an answer? |
| A. | 3 |
| B. | 4 |
| C. | 5 |
| D. | 6 |
| Answer» C. 5 | |
| 17. |
Find the keyword which is not used to implement exception? |
| A. | try |
| B. | catch |
| C. | finally |
| D. | access |
| Answer» E. | |
| 18. |
Feature of Java? |
| A. | Robust andsecure |
| B. | Simple andFamiliar |
| C. | PlatformIndependence |
| D. | All of theabove |
| Answer» E. | |
| 19. |
Each catch clause (exception handler) is like a little function thattakes a --------Argument`s of one particular type? |
| A. | many |
| B. | two |
| C. | single |
| D. | either A) or B) |
| Answer» D. either A) or B) | |
| 20. |
Choose the proper operator precedence when evaluating anExpression 1. Comparisons 2. Logical operations 3. Increment 4.Arithmetic operations? |
| A. | 1-2-4-3 |
| B. | 4-3-1-2 |
| C. | 2-1-4-3 |
| D. | 3-4-1-2 |
| Answer» E. | |
| 21. |
The extension of C++ object code is __? |
| A. | .obj |
| B. | .cpp |
| C. | .ppt |
| D. | .xls |
| Answer» B. .cpp | |
| 22. |
The __ keyword/s do not apply to friend functions, as the class hasno controlover the scope of friends? |
| A. | public |
| B. | protected |
| C. | private |
| D. | both A) andB) |
| Answer» E. | |
| 23. |
__classes are used in cases where one class is tightly coupled toanother class? |
| A. | Abstract |
| B. | friend |
| C. | static |
| D. | virtual |
| Answer» C. static | |
| 24. |
__pointers are not modifiable? |
| A. | that |
| B. | this |
| C. | Indirection |
| D. | Address |
| Answer» C. Indirection | |
| 25. |
__C++ header file that handles input output functions is? |
| A. | isotream.h |
| B. | iomanip.h |
| C. | string.h |
| D. | fstream.h |
| Answer» B. iomanip.h | |
| 26. |
__A class that declares or inherits a virtual function is called? |
| A. | Encapsulationclass |
| B. | inherited class |
| C. | polymorphicclass |
| D. | static class |
| Answer» D. static class | |
| 27. |
__feature in OOP allows reusing code? |
| A. | Polymorphism |
| B. | Inheritance |
| C. | Encapsulation |
| D. | Data hiding |
| Answer» C. Encapsulation | |
| 28. |
Header file C contain? |
| A. | Compliercommand |
| B. | Libraryfunctions |
| C. | Headerinformation of cprograms |
| D. | Operators forfiles |
| Answer» C. Headerinformation of cprograms | |
| 29. |
Which of the following is valid in c? |
| A. | `a |
| B. | `abc` |
| C. | `a` |
| D. | `abc` |
| Answer» D. `abc` | |
| 30. |
The continue command cannot be used with? |
| A. | For |
| B. | Switch |
| C. | Do |
| D. | While |
| Answer» C. Do | |
| 31. |
The number of relation operators in the C language is? |
| A. | Four |
| B. | Six |
| C. | Three |
| D. | Seven |
| Answer» C. Three | |
| 32. |
In the C language a represents? |
| A. | A digit |
| B. | An integer |
| C. | A character |
| D. | A word |
| Answer» D. A word | |
| 33. |
Which of the following is a key word is used for a storage class? |
| A. | Printf |
| B. | External |
| C. | Auto |
| D. | Scanf |
| Answer» D. Scanf | |