C++ MCQs
- C++ was originally developed by;
- Which of the followinig are procedural languages?
- Reusability is a desirable feature of a language as it
- Choose the correct remarks.
- Which of the following operators cannot be overloaded ?
- Overloading is otherwise called as
- C++ encourages structuring.a software as a collection of components that are
- cout stands for
- The fields in a structure of a C program are by default
- Forgetting to include a file (like cmath or math.h) that is necessary will result in
- Which of the following comments about inline comments are true?
- At what point of time a variable comes into existence in memory is determined by its
- Which of the following specifiers need not be honored by the compiler?
- Which of the following cannot be declared static?
- Which of the following cannot be declared static?
- Let class APE be a friend of class SAPIEN. Let class HUMAN be a child class of SAPIEN and let MONKEY be a child class of APE. Then
- A class having no name
- for a method to be an interface between the outside world and a class, it has to be declared
- Choose the correct statements from the following:
- The fields in a class, of a C++ program are by default
- A constructor is called whenever
- Which of the following remarks about the differences between constructors and destructors are correct ?
- Choose the correct statements.
- Choose the correct statements regarding inline functions.
- If many functions-have the same name, which of the following information, if present, will be used by the compiler to invoke the correct function to be used?
- Which of the following parameter passing mechanism(s) is/are supported by C++, but not by C?
- Which of the following type of functions is an ideal candidate for being declared inline?
- Which of the following decides if a function that is declared inline is indeed going to be treated inline in the executable code?
- Which of the following type of functions is an ideal candidate for being declared inline?
- One of the disadvantages of pass-by reference is that the called function may inadvertently corrupt the caller's data. This can be avoided by
- Data hiding is used to create
- Friendship may be granted to
- If My Class is a friend of Your-Class, which is true?
- Forcing a variable type to become another type before accessing an appropriate function is called
- The programming language feature that allows the sameoperation to be carried out differently depending on the object is
- Specifically, overloading involves
- Object-oriented programmers primarily focus on
- Which of the following is the correct syntax to print the message in C++ language?
- c++ is a type of language
- c++ is a high-level language
- what is the use of c++ programming language in real life?
- which of the following is the correct identifier?
- which of the following comment syntax is correct to create a single-line comment in the c++ program?
- for inserting a new line in c++ program, which one of the following statements can be used?
- which of the following is called extraction/get from operator?
(a) Clocksin and Mellish
(b) Donald E. Knuth
(c) Sir Richard Hadlee
(d) Bjame Stroustrup
(d) Bjame Stroustrup
(a) Pascal
(b) Smalltalk
(c) C
(d) Both(a) and (c)
(d) Both(a) and (c)
(a) decreases the testing time
(b) lowers the maintenance cost
(c) reduces the compilation time
(d) Both (a) and (b)
(d) Both (a) and (b)
(a) C++ allows any operator to be overloaded.
(b) Some of the existing operators cannot be overloaded.
(c) Operator precedence cannot be changed.
(d) All of the above.
(c) Operator precedence cannot be changed.
(a) >>
(b) ?:
(c) .
(d) Both (b) and (c)
(d) Both (b) and (c)
(a) virtual polymorphism
(b) transient polymorphism
(c) pseudo polymorphism
(d) ad-hoc polymorphism
(d) ad-hoc polymorphism
(a) highly cohesive and loosely coupled
(b) not highly cohesive but loosely coupled
(c) highly cohesive and tightly coupled
(d) not highly cohesive but tightly coupled
(a) highly cohesive and loosely coupled
(a) class output
(b) character output
(c) console output
(d) call output
(c) console output
(a) protected
(b) public
(c) private
(d) none of the above
(b) public
(a) compilation error
(b) warning when the program is run
(c) error at link time
(d) warning when the program is compiled
(a) compilation error
(a) A function is declared inline by typing the keyword inline before the return value of the function.
(b) A function is declared inline by typing the keyword inline after the return value of the function.
(c) A function that is declared inline may not be treated inline.
(d) Both (a) & (c)
(d) Both (a) & (c)
(a) scope
(b) storage class
(c) data type
(d) all of the above
(b) storage class
(a) register
(b) inline
(c) static
(d) Both (a) & (b)
(d) Both (a) & (b)
(a) Class
(b) Object
(c) Functions
(d) Both (a) & (b)
(d) Both (a) & (b)
(a) Class
(b) Object
(c) Functions
(d) Both (a) & (b)
(d) Both (a) & (b)
(a) SAPIEN is not a friend of APE
(b) APE is not a friend of HUMAN
(c) MONKEY is not a friend of SAPIEN
(d) All of these
(d) All of these
(a) cannot be passed as an argument
(b) cannot have a constructor
(c) cannot have a destructor
(d) All of these
(d) All of these
(a) private
(b) protected
(c) public
(d) external
(c) public
(a) In a struct, the access control is public by default.
(b) In a class, the access control is private by default.
(c) In a class, the access control is public by default.
(d) Both (a) & (b)
(d) Both (a) & (b)
(a) protected
(b) public
(c) private
(d) none of the above
(c) private
(a) an object is declared
(b) an object is used
(c) a class is declared
(d) a class is used
(a) an object is declared
(a) Constructors can take arguments but destructors cannot.
(b) Constructors can be overloaded but destructors cannot be overloaded.
(c) Destructors can take arguments but constructors cannot.
(d) Both (a) and (b)
(d) Both (a) and (b)
(a) A destructor is not inherited
(b) A constructor cannot be called explicitly
(c) A constructor is not inherited
(d) All of these
(d) All of these
(a) It speeds up execution
(b) It slows down execution
(c) It increases the code size
(d) Both (a) and (c)
(d) Both (a) and (c)
(a) The operator : :
(b) The return value of the function
(c) Function signature
(d) Both (a) & (c)
(d) Both (a) and (c)
(a) Pass by value
(b) Pass by reference
(c) Pass by value-result
(d) All of the above
(b) Pass by reference
(a) A function that is small and is not called frequently.
(b) A function that is small and is called frequently.
(c) A function that is not small and is not called frequently.
(d) A function that is not small and is called frequently.
b) A function that is small and is called frequently.
(a) Compiler
(b) Linker
(c) Loader
(d) Preprocessor
(a) Compiler
(a) A function that is small and is not called frequently.
(b) A function that is small and is called frequently.
(c) A function that is not small and is not called frequently.
(d) A function that is not small and is called frequently.
(b) A function that is small and is called frequently
(a) passing pointers
(b) declaring the formal parameters constant
(c) declaring the actual parameters constant
(d) all of the above
(b) declaring the formal parameters constant
(a) inline functions
(b) private class members
(c) nonscalar type
(d) cryptic code
(b) private class members
(a) no member functions of other classes
(b) one member function from one other class
(c) one member function each from as many classes as appropriate
(d) as many member functions of other classes as appropriate.
(d) as many member functions of other classes as appropriate.
(a) Your Class is a friend of My Class
(b) Your Class is not a friend of MY Class
(c) Your c!ass may or may not be a friend of My Class
(d) Your Class cannot be a friend of My Class.
(c) Your c!ass may or may not be a friend of My Class
(a) regression
(b) recursion
(c) conversion
(d) coersion
(d) coersion
(a) polymorphism
(b) inheritance
(c) allocation
(d) mangling
(a) polymorphism
(a) one function with a variety of arguments
(b) multiple functions defined with the same name
(c) one function with multiple names
(d) multiple functions with different names.
(b) multiple functions defined with the same name
(a) procedures to be performed
(b) step-by-step statements needed to solve a problem
(c) objects and the tasks that must be performed with those objects
(d) physical orientation of objects within a program.
(c) objects and the tasks that must be performed with those objects
(a) cout << "Hello world!";
(b) Cout << "Hello world! ;
(c) Out << "Hello world!;
(d) None of the above
(a) cout << "Hello world!";
(a) Low Level Language
(b) middle-level language
(c) Hight level Language
(d) None
(b) middle-level language
(a) object-oriented programming language
(b) middle-level language
(c) Hight level Language
(d) None
(a) object-oriented programming language
(a) operating systems,embedded software, autonomous cars
(b) games
(c) medical technology
(d) All of above
(d) All of above
(a) 7var_name
(b) 7VARNAME
(c) VAR_1234
(d) $var_name
(c) VAR_1234
(a) //commment
(b) comment//
(c) #comment
(d) None
(a) //commment
(a) \n
(b) \t
(c) n//
(d) \\n
(a) \n
(a) <<
(b) >>
(c) <
(d) >
(b) >>
Cover Topics
"C++ MCQs With Answer","c++ multiple choice questions and answers pdf","c++ multiple choice questions with answers","c++ mcq online test","C++ Important MCQs,c++ quiz,c++ questions pdf","C++ Programming Multiple Choice Questions and Answers" ,"C++ (CPP) mcq, C++ MCQ","C++ Programming quiz answers PDF"
إرسال تعليق
We welcome relevant and respectful comments. Off-topic or spam comments may be removed.