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

51.Which of the following C constructs is an abstraction mechanism for the language?
A.Functions
B.Overloaded operators
C.Function pointers
D.All of the above
View/Hide Ans
Explanation
52.If computing is about making data available in useful forms, why is data hiding important?
A.Because some data is too sensitive to be made generally available
B.Because some data should only be accessed in well-defined, well-controlled ways
C.Because some data cannot be made available in useful forms
D.Because some data may be incorrect Computing isn't about making data available
View/Hide Ans
Explanation
53.What is a function pointer useful for?
A.Telling the hardware which function is to be called next
B.Providing a form of polymorphism in imperative languages
C.Ensuring that a function returns to the correct place in the code, after it executes
D.Passing parameters to a function in a language which does not have references
View/Hide Ans
Explanation
54.Which of the following declares a pointer to a function g, which takes two ints and returns nothing?
A.(*g)(int,int);
B.void (*g)(int,int);
C.(*g)(int,int) = void;
D.*(void g(int,int));
View/Hide Ans
Explanation
55.What is the name of the operator which allocates single objects dynamically?
A.new
B.new[]
C.ClassName (where ClassName is the name of the desired class)
D.~ClassName (where ClassName is the name of the desired class) create
View/Hide Ans
Explanation
56.What is a "reference"?
A.A synonym for "pointer"
B.Another name for a type
C.A way of copying objects without extra memory
D.A name for any parameter to a C++ generic type
View/Hide Ans
Explanation
57.What are the disadvantages of passing arguments by reference?
A.Changes to parameter values within the function also affect the original arguments.
B.It's slower, because constructors cannot be used.
C.Because the binding of references is fixed (unlike pointers), the value of a reference parameter can't be changed within the function.
D.All of the above
View/Hide Ans
Explanation
58.Why is a constructor useful?
A.Because it gives us a way of allocating memory dynamically
B.Because it ensures that objects are properly initialized
C.Because it ensures that object stay in their original scope
D.Because is hides the details of object creation from the user
View/Hide Ans
Explanation
59.Why can a class have many constructors, but at most one destructor?
A.Because destructors are much more expensive than constructors
B.Because destructors can only be called once, whereas constructors may be called more than once
C.Because the destructor never takes arguments, so the only possible parameter list for a destructor is "(void)"
D.Because destructors are always called at the end of a block, whereas constructors can be called anywhere in the code
View/Hide Ans
Explanation
60.Which is the correct syntax to define an overloaded assignment operator for assigning object of class Y to objects of class X
A.void operator=(X& to, const Y& from);
B.void Y::operator=(const Y& from);
C.void X::operator=(X& to, const Y& from);
D.void X::operator=(const Y& from);
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