1) Constant variables can be created in CPP by using ________ .
a. enum
b. const
c. #define
d. All of these
2) In CPP, cin and cout are the predefined stream __________
a. Operator
b. Functions
c. Objects
d. Data types
3) Classes in CPP are________ .
a. derived data types
b. User defined data types
c. built-in data types
d. All of these
4) In CPP, it is mandatory and must to initialize const variables.
a. True
b. False
5. Logical expressions produce ____________ type results.
a. explicit
b. garbage
c. bool
d. static
6. If a program uses Inline Function, then the function is expanded inline at ___________
a. Compile time
b. Run time
c. Both a and b
d. None of these
7. By default, members of the class are ____________ in nature.
a. protected
b. private
c. public
d. static
8. Function overloading can also be achieved if two or more functions differ only in their return types
a. True
b. False
9. Assigning one or more function body to the same name is called ____________
a. Function Overriding
b. Function Overloading
c. Both a and b
d. None of the above
10. Default values for a function are specified when ____ .
a. function is defined
b. function is declared
c. Both a and b
d. None of these
11. Default return type of functions in CPP is ____ .
a. void
b. long
c. char
d. int
No comments:
Post a Comment