forum_image

Discussion Forum

Interative Forum for discussing any query literally to UGC-NET Computer Science, GATE Computer Science and Computer Sciene and Technology in general.

ugc_net image

UGC-NET Computer Science

Correspondence Courses and Test Series to prepare for UGC-NET computer science and applications

GATE image

GATE

MCQs, Lecture Notes, Ebooks for GATE preparation

freestuff image
jobs image

Jobs Newsfeed

Timely information of various Recruitments.

NextPrev

MCQs C++ |UGC-NET|GATE|Computer Science

61.If a binary operator is overloaded as a member function, how many parameters will the member function require?
A.None. Both operands are passed via the object.
B.One, to pass the second operand. The first operand is the object itself.
C.Two, to pass the first and second operands.
D.Binary operators can't be overloaded at all.
View/Hide Ans
Explanation
62.What constraints does the compiler put on a const member function?
A.It cannot change any mutable data member of the object on which it is called
B.It cannot change any non-mutable data member of the object on which it is called
C.It cannot call any other non-const member function of the object on which it is called
D.It cannot change any non-mutable data member, nor call any other non-const member function, of the object on which it is called
View/Hide Ans
Explanation
63.A "friend" function is one which:
A.Belongs to a particular class, but (in some ways) acts like is doesn't.
B.Doesn't belong to a particular class, but (in some ways) acts like it does.
C.Belongs to a particular class, but can be called without referring to an object of that class.
D.Is a private member of a class, which exists just to "help" the public member functions
View/Hide Ans
Explanation
64.Friend functions are useful because:
A.They allow us to break the encapsulation of any class whenever we want to, which makes coding much easier since we don't have to worry about respecting the class interface
B.They allow us to break the encapsulation of other user-defined classes whenever we want, thereby enabling us to improve efficiency
C.They allow us to break encapsulation in a controlled manner, which ensures that efficiency does not compromise maintainability
D.They prevent non-overloaded functions from getting lonely
View/Hide Ans
Explanation
65.Apart from operator=, the operators most commonly overloaded are operator<< and operator>>. Why?
A.Because left- and right-shifting is a very common task in programs.
B.Because they can be member functions or global functions.
C.Because they make it easy to do I/O on user-defined classes.
D.Because in early versions of C++, they were the only operators which could be overloaded.
View/Hide Ans
Explanation
66.A friend of a class is also automatically a friend of
A.its base class(es)
B.its derived class(es)
C.any other friends of the class
D.none of the above
View/Hide Ans
Explanation
67.Which of these is not true about static data member?
A.Can be accessed only static members
B.Each object of the class will have its own copy of static data member
C.Memory will be allocates only once during the class declaration
D.When any object modifies static data member , the result will be visible to all instances of the class
View/Hide Ans
Explanation
68.Which of these is false about static member functions?
A.Static member functions cannot be defined in the private section of a class
B.Can access only static data members of the class
C.Static member functions can invoke other static member functions
D.Static member functions defined in the public section of a class declaration can not be accessed without specifying an object of the class
View/Hide Ans
Explanation
69.Which is the parameter that is added to every non-static member function when it is called?
A.Constructor
B.'this' pointer
C.Void *
D.reference
View/Hide Ans
Explanation
70.To convert from a basic type to a user defined class , which of these is necessary
A.Built in conversion
B.A one argument constructor
C.An operator function
D.A conversion function thatís the member of the class
View/Hide Ans
Explanation


Author Does Not claim of any answer these answers are as per expert opinion


Pages: 1 2 3 4 5 6 7 8 9