Q.1
Which language among the following doesn’t allow pointers?
  • a) C++
  • b) Java
  • c) Pascal
  • d) C
Q.2
Which is correct syntax for declaring pointer to object?
  • a) className* objectName;
  • b) className objectName;
  • c) *className objectName;
  • d) className objectName();
Q.3
Which operator should be used to access the members of the class using object pointer?
  • a) Dot operator
  • b) Colon to the member
  • c) Scope resolution operator
  • d) Arrow operator
Q.4
How does compiler decide the intended object to be used, if more than one object are used?
  • a) Using object name
  • b) Using an integer pointer
  • c) Using this pointer
  • d) Using void pointer
Q.5
If pointer to an object is declared __________
  • a) It can store any type of address
  • b) It can store only void addresses
  • c) It can only store address of integer type
  • d) It can only store object address of class type specified
Q.6
What is the size of an object pointer?
  • a) Equal to size of any usual pointer
  • b) Equal to size of sum of all the members of object
  • c) Equal to size of maximum sized member of object
  • d) Equal to size of void
Q.7
A pointer _________________
  • a) Can point to only one object at a time
  • b) Can point to more than one objects at a time
  • c) Can point to only 2 objects at a time
  • d) Can point to whole class objects at a time
Q.8
Pointer to a base class can be initialized with the address of derived class, because of _________
  • a) derived-to-base implicit conversion for pointers
  • b) base-to-derived implicit conversion for pointers
  • c) base-to-base implicit conversion for pointers
  • d) derived-to-derived implicit conversion for pointers
Q.9
Can pointers to object access the private members of the class?
  • a) Yes, always
  • b) Yes, only if it is only pointer to object
  • c) No, because objects can be referenced from another objects too
  • d) No, never
Q.10
Is name of an array of objects is also a pointer to object?
  • a) Yes, always
  • b) Yes, in few cases
  • c) No, because it represents more than one object
  • d) No, never
Q.11
Which among the following is true?
  • a) The pointer to object can hold address only
  • b) The pointer can hold value of any type
  • c) The pointer can hold only void reference
  • d) The pointer can’t hold any value
Q.12
Which is the correct syntax to call a member function using pointer?
  • a) pointer->function()
  • b) pointer.function()
  • c) pointer::function()
  • d) pointer:function()
Q.13
If a pointer to an object is created and the object gets deleted without using the pointer then __________
  • a) It becomes void pointer
  • b) It becomes dangling pointer
  • c) It becomes null pointer
  • d) It becomes zero pointer
Q.14
How can the address stored in the pointer be retrieved?
  • a) Using * symbol
  • b) Using $ symbol
  • c) Using & symbol
  • d) Using @ symbol
Q.15
What should be done to prevent changes that may be made to the values pointed by the pointer?
  • a) Usual pointer can’t change the values pointed
  • b) Pointer should be made virtual
  • c) Pointer should be made anonymous
  • d) Pointer should be made const
Q.16
References to object are same as pointers of object.
  • a) True
  • b) False
0 h : 0 m : 1 s