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

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