ThatQuiz Test Library Take this test now
OOPS Formative Test-I
Contributed by: Reddy
  • 1. Pick the odd one out
A) None of the above
B) boolean type
C) integer type
D) character type
E) array type
  • 2. Which data type is used to represent the absence of parameters?
A) int
B) float
C) char
D) string
E) void
  • 3. What does ‘\a’ escape code represent?
A) alone
B) nextline
C) form feed
D) alert
E) tabspace
  • 4. Which type is best suited to represent the logical values?
A) All of the above
B) float
C) character
D) integer
E) boolean
  • 5. Which of the following accesses the seventh element stored in array?
A) array[7]
B) array(6)
C) array(7)
D) array[6]
E) array(5)
  • 6. What does a class in C++ holds?
A) both data & functions
B) only functions
C) All of the above
D) only data
E) macros
  • 7. Which is used to define the member of a class externally?
A) #
B) :
C) @
D) ?:
E) ::
  • 8. Which keyword is used to define the user defined data types?
A) structure
B) def
C) union
D) type
E) typedef
  • 9. Which of these following members are not accessed by using direct member access operator?
A) private
B) public
C) All of the above
D) both private & protected
E) protected
  • 10. Which special character is used to mark the end of class?
A) //
B) .
C) ;
D)
E) ::
  • 11. What is the syntax of user-defined data types?
A) typedef NameByUser ExistingDataType
B) typedef ExistingDataType NameByUser
C) None of the above
D) def NameByUser ExistingDataType
  • 12. What is the scope of typedef defined data types?
A) inside that block only
B) outside the program
C) None of the above
D) whole program
  • 13. What is the replacement of macros in C++
A) conditional operator
B) inline functions
C) None of the above
D) friend functions
  • 14. Which of the below are object oriented features
A) All of the above
B) data binding
C) encapsulation
D) polymorphism
E) inheritance
  • 15. A constructor that accepts __________ parameters is called the default constructor.
A) three
B) zero
C) two
D) one
E) four
  • 16. Destructor has the same name as the constructor and it is preceded by ______ .
A) ~
B) @
C) #
D) %
E) !
  • 17. __________ used to make a copy of one class object from another class object of the same class type.
A) default constructor
B) inline function
C) copy constructor
D) friend function
E) constructor
  • 18. How many default constructors per class are possible?
A) Two
B) Three
C) All the above
D) Multiple
E) One
  • 19. Which of the following type of data member can be shared by all instances of its class?
A) protected
B) public
C) static
D) friend
E) private
  • 20. Which of the following gets called when an object goes out of scope?
A) destructor
B) constructor
C) None
D) main
E) virtual function
Students who took this test also took :

Created with That Quiz — the site for test creation and grading in math and other subjects.