(A) data type
(B) memory referee
(C) value
(D) none of the given options.
Category: Introduction to Programming Mcqs
Introduction to Programming Mcqs for Screening tests, Interviews, Viva and Other competitive exams. Programming Mcqs section will help users to prepare mcqs of programming languages for various exams. Aspirants of Lecturer Computer Science, SST Computer Science, Subject Specialist Computer Science, Data Entry operator, Computer Programmer, Computer Operator, Software engineer and all other Competitive Exams can prepare their computer programming portion from here.
The static data members of a class are initialized __.
(A) at file scope
(B) within class definition
(C) within member function
(D) within main function
Which one of the following is the declaration of overloaded pre-increment operator implemented as member function?
(A) Class-name operator +() ;
(B) Class-name operator +(int) ;
(C) Class-name operator ++() ;
(D) Class-name operator ++(int) ;
The operator function will be implemented as __, if obj1 drive the – operator whereas obj2 is passed as arguments to – operator in the statement given below. obj3 = obj1 – obj2;?
(A) Member function
(B) Non-member function
(C) Friend function
(D) None of the given options
For non-member operator function, object on left side of the operator may be?
(A) Object of operator class
(B) Object of different class
(C) Built-in data type
(D) All of the given options
The operator function overloaded for an Assignment operator (=) must be?
(A) Non-member function of class
(B) Member function of class
(C) Friend function of class
(D) None of the given options
Which of the following statement is best regarding declaration of friend function?
(A) Friend function must be declared after public keyword.
(B) Friend function must be declared after private keyword.
(C) Friend function must be declared at the top within class definition.
(D) It can be declared anywhere in class as these are not affected by the public and private keywords.
new and delete are __ whereas malloc and free are __.
(A) Functions, operators
(B) Classes, operators
(C) Operators, functions
(D) Operators, classes