Friday, 14 October 2016

C & C++ Programming Multiple Choice Questions - Set 25

1.       Which of the following gives the memory address of a variable pointed to a pointer a?
(A) *a;                 (B) a;
(C) &a;               (D) address(a);
Answer: A
2.       Which of the following gives the value stored at the address pointed to by the pointer a?
(A) a;                  (B) val(a);
(C) *a;                (D) &a;
Answer: C
3.       A derived class ....................
(A) inherits data members and member functions from base class.
(B) inherits constructors and destructor.
(C) object can access protected members with the dot operator.
(D) inherits data members and member functions from base class as well as Inherits constructors and destructor.
Answer: D
4.       The .................. is a relationship.
(A) polymorphism        (B) inheritance
(C) overloading                        (D) overriding
Answer: B
5.       The data members of ................. share the same memory.
(A) union           (B) structure
(C) function      (D) class
Answer: A

6.       For a binary member operator function, the left operand is passed through .................
(A) pointer         (B) reference
(C) this               (D) parameter
Answer: C
7.       A ................ function is a function that has no body inside its base class.
(A) inline                       (B) friend
(C) constructor             (D) pure virtual
Answer: D
8.       One of the methods to stop the execution of the function is by calling the standard .................. function.
(A) goto              (B) jump
(C) stop              (D) exit
Answer: D
9.       The specific version of the generic function created by the compiler is called as ...............
(A) specialization
(B) generalization
(C) general function
(D) template function
Answer: A
10.    A class that is inherited is called as .............. class.
(A) derived        (B) child
(C) base                        (D) abstract
Answer: C


0 comments:

Post a Comment

UGC NET Computer Science

Computer GK App