

MCQOPTIONS
Saved Bookmarks
This section includes 172 Mcqs, each offering curated multiple-choice questions to sharpen your Artificial Intelligence knowledge and support exam preparation. Choose a topic below to get started.
1. |
Which operator is used with cout? |
A. | >> |
B. | << |
C. | > |
D. | < |
Answer» C. > | |
2. |
Which feature can be implemented using |
A. | Inheritance |
B. | Abstraction |
C. | Polymorphism |
D. | Overloading |
Answer» C. Polymorphism | |
3. |
A base class is also known as class. |
A. | Basic |
B. | Inherited |
C. | Super |
D. | Sub |
Answer» D. Sub | |
4. |
Derived class is also known as |
A. | Sub Class |
B. | Small Class |
C. | Big Class |
D. | Noticeable Class |
Answer» B. Small Class | |
5. |
What is used to read from the console in C++? |
A. | cin |
B. | scanf |
C. | read |
D. | getline |
Answer» B. scanf | |
6. |
Out of the following, which is not a member of the |
A. | Static function |
B. | Friend function |
C. | Const function |
D. | Virtual function |
Answer» C. Const function | |
7. |
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 | |
8. |
What is the other name used for functions inside a |
A. | Member variables |
B. | Member functions |
C. | Class functions |
D. | Class variables |
Answer» C. Class functions | |
9. |
Which of the following is used for comments in |
A. | //comment |
B. | /comment |
C. | *comment |
D. | ?comment |
Answer» B. /comment | |
10. |
Which operator is used with cin ? |
A. | >> |
B. | << |
C. | > |
D. | < |
Answer» B. << | |
11. |
What is used to write/display to the console in C++? |
A. | printf |
B. | cout |
C. | write |
D. | putline |
Answer» C. write | |
12. |
Destructor has a same name as the constructor and it is preceded by? |
A. | ! |
B. | ? |
C. | ~ |
D. | $ |
Answer» D. $ | |
13. |
# directives must be present |
A. | before the main() function |
B. | after the main() function |
C. | at the end of the program |
D. | anywhere in the program body |
E. | None of the above |
Answer» B. after the main() function | |
14. |
We can output text to an object of class ofstream using the insertion operator « because |
A. | the ofstream class is a stream |
B. | the insertion operator works with all classes |
C. | we are actually outputting to cout |
D. | the insertion operator is overloaded in ofstream |
Answer» E. | |
15. |
Which of the following operator can be overloaded through friend function? |
A. | -> |
B. | |
C. | ( ) |
D. | * |
Answer» E. | |
16. |
Complex real object must have some particular movement, referred to as |
A. | behavior |
B. | variables |
C. | constants |
D. | strings |
Answer» B. variables | |
17. |
Data type integer 'int' can't |
A. | create variable |
B. | create data type |
C. | declare integer |
D. | initialize integer |
Answer» B. create data type | |
18. |
First object oriented language 'Smalltalk' were first appeared in |
A. | 1972 |
B. | 1982 |
C. | 1992 |
D. | 2000 |
Answer» B. 1982 | |
19. |
Attributes are also known as |
A. | characteristics |
B. | behavior |
C. | constants |
D. | loops |
Answer» B. behavior | |
20. |
Data structure in which a record is linked to two successor records, usually referred to as the left branch when greater and the right when less than the previous record is termed as |
A. | customized array |
B. | stack |
C. | binary tree |
D. | decimal tree |
Answer» D. decimal tree | |
21. |
The building block of C++ that leads to object oriented programming is termed as |
A. | class |
B. | object |
C. | function |
D. | construct |
Answer» B. object | |
22. |
An object in a class is often called |
A. | element |
B. | instance |
C. | bit |
D. | baud |
Answer» C. bit | |
23. |
Process used for determining respective project's requirements and than develop a design for that project is termed as |
A. | initializing |
B. | requirement checking |
C. | analysis |
D. | project study |
Answer» D. project study | |
24. |
In object oriented language rather than other programming languages, program's data |
A. | can access directly |
B. | can't access directly |
C. | can't call |
D. | can't declare |
Answer» C. can't call | |
25. |
Writing, debugging and maintaining the program's data can be done with the help of |
A. | member functions |
B. | bit functions |
C. | local functions |
D. | linear functions |
Answer» B. bit functions | |
26. |
The use of existing assets in some form within the software product development process is termed as |
A. | reusability |
B. | usability |
C. | robust |
D. | reboot |
Answer» B. usability | |
27. |
In object oriented language, program is divided into |
A. | objects |
B. | functions |
C. | data |
D. | loops |
Answer» B. functions | |
28. |
Functions ability to act in different ways on different data types is termed as |
A. | polymorphism |
B. | dimorphism |
C. | trimorphisim |
D. | automorphism |
Answer» B. dimorphism | |
29. |
Object oriented language has single unit which combines |
A. | data and function |
B. | data and constant |
C. | function and simulation |
D. | string and character |
Answer» B. data and constant | |
30. |
First object oriented language is |
A. | SmallTalk |
B. | C++ |
C. | C |
D. | JAVA |
Answer» B. C++ | |
31. |
Superset of C language is said to be language |
A. | C++ |
B. | Java |
C. | PHP |
D. | Smalltalk |
Answer» B. Java | |
32. |
What value does function mystery return when called with a value of 4?int mystery ( int number ){if ( number <= 1 )return 1;elsereturn number * mystery( number – 1 );} |
A. | 0 |
B. | 1 |
C. | 4 |
D. | 24 |
Answer» E. | |
33. |
Maximum number of template arguments in a function template is |
A. | one |
B. | two |
C. | three |
D. | many |
Answer» E. | |
34. |
Analysis process which involves analyzing and designing of system from an object-oriented programming is termed as |
A. | Object Analysis |
B. | Object Oriented Analysis |
C. | Overall Oriented Analysis |
D. | System Analysis |
Answer» C. Overall Oriented Analysis | |
35. |
Code reuse is also known as |
A. | software reuse |
B. | hardware reuse |
C. | exist reuse |
D. | dead reuse |
Answer» B. hardware reuse | |
36. |
Element of computer-user environment is |
A. | windows |
B. | matlab software |
C. | paint |
D. | joystick |
Answer» B. matlab software | |
37. |
For automobile, horsepower and number of doors in a car are referred to as |
A. | attributes |
B. | behavior |
C. | constants |
D. | loops |
Answer» B. behavior | |
38. |
Employees in an office is human's |
A. | object |
B. | entity |
C. | data type |
D. | object |
Answer» C. data type | |
39. |
In C++, the original class is called |
A. | base class |
B. | derived class |
C. | sub class |
D. | object |
Answer» B. derived class | |
40. |
Unrestricted use of goto is harmful, because it |
A. | results in the compiler generating longer machine code |
B. | increases memory requirement of programs |
C. | increases the running time of programs |
D. | makes debugging difficult |
Answer» E. | |
41. |
Language which is called pure object oriented language because everything in it is treated consistently as an object, from primitives such as characters and punctuation, all the way up to whole classes, prototypes, blocks, modules, etc. is |
A. | SmallTalk |
B. | PHP |
C. | C |
D. | Matlab |
Answer» B. PHP | |
42. |
Data and function in object oriented programming is encapsulated into |
A. | single unit |
B. | two different units |
C. | global data |
D. | local data |
Answer» B. two different units | |
43. |
Fundamental idea behind object oriented languages is to combine into a |
A. | single unit |
B. | multiple units |
C. | two units |
D. | three units |
Answer» B. multiple units | |
44. |
The use of existing software, or software knowledge, to build new software, following the reusability principles is termed as |
A. | exist reuse |
B. | code reuse |
C. | hardware reuse |
D. | dead reuse |
Answer» C. hardware reuse | |
45. |
In procedural language, reusability can occurs in |
A. | variables |
B. | constant |
C. | library functions |
D. | member functions |
Answer» C. library functions | |
46. |
Match between programming objects and real world objects is result of combining |
A. | variables and constant |
B. | variables and data |
C. | functions and data |
D. | functions and loops |
Answer» D. functions and loops | |
47. |
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. |
A. | Only II is correct. |
B. | Both I and II are correct. |
C. | Only I is correct. |
D. | Both I and II are incorrect. |
Answer» D. Both I and II are incorrect. | |
48. |
Function which provides the only way to access its data is |
A. | member function |
B. | bit function |
C. | obj function |
D. | linear function |
Answer» B. bit function | |
49. |
In a class specifier ,data or function designated private are accessible |
A. | To any function in the program |
B. | Only if you the password |
C. | To member functions of that class |
D. | Only to public members of the class |
Answer» D. Only to public members of the class | |
50. |
Object provides an approach to program organization by helping to |
A. | delete program's data |
B. | maintain program's data |
C. | send program's data |
D. | initialize program's data |
Answer» C. send program's data | |