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

21.What is the fundamental use of classes?
A.Define objects
B.Define a new type and a new scope
C.Make programming easy
D.Classify the program
View/Hide Ans
Explanation
22.Each class defines-
A.Objects
B.Structures
C.Program logic
D.Zero or more members
View/Hide Ans
Explanation
23.If the const keyword is used in front of a member function what will be the behavior of the member function
A.The member function can change the data members on which it operates
B.The member function may change the data members on which it operates
C.The member function may not change the data members on which it operates
D.The member function will return constant value
View/Hide Ans
Explanation
24.The data abstraction and encapsulation view of the type is defined, respectively, by which access specifiers
A.Public and Private
B.Private and Public
C.Protected and public
D.Private and protected
View/Hide Ans
Explanation
25.When overloading an operator which of these is not true
A.Cannot change precedence or associativity
B.Default arguments cannot be used
C.Cannot change the number of arguments that an operator takes
D.Can change the basic behaviour of operators
View/Hide Ans
Explanation
26.When reallocating memory if any other pointers point into same piece of memory do these pointers-
A.need to be readjusted
B.they get readjusted automatically
C.C does it on behalf of user
D.none of above
View/Hide Ans
Explanation
27.For overloading an operator which of the following is true
A.Can create new operators
B.Meaning of how an operator works with built-in types, such as int, cannot be changed
C.Operators cannot be overloaded either for user-defined objects or for a combination of user-defined and built-in objects
D.all of above
View/Hide Ans
Explanation
28.If an operator function is not a member of the class then what is another way of overloading the operator
A.Using inline function
B.Using friend keyword in prototype within the class and as global function outside class
C.Using friend keyword in prototype within the class and outside class
D.As a simple function
View/Hide Ans
Explanation
29.A unary operator for a class can be overloaded in this ways
A.If the operator function is a nonmember it has zero parameter
B.If the operator function is a member of the class, it has no parameters
C.If the operator function is a member it has one parameter
D.If the operator function is a member of the class, it has two parameters
View/Hide Ans
Explanation
30.Classes with pointer member variables must not
A.Explicitly overload the assignment operator
B.Include the copy constructor
C.Include the destructor
D.Use a non member operator function
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