C++ Multiple Choice Questions for Practitioners

Home » C++ » MCQs for Practitioners

Showing 101 - 124 of 124


Question: 101

(A) True
(B) False



Level: Practitioner
Category of MCQ: vtable in C++

Question: 102

(A) True
(B) False



Level: Practitioner
Category of MCQ: typecasting in C++

Question: 103

(A) True
(B) False



Level: Practitioner
Category of MCQ: typecasting in C++

Question: 104

(A) True
(B) False



Level: Practitioner
Category of MCQ: typecasting in C++

Question: 105

(A) True
(B) False



Level: Practitioner
Category of MCQ: typecasting in C++

Question: 106

(A) True
(B) False



Level: Practitioner
Category of MCQ: typecasting in C++

Question: 107

(A) True
(B) False



Level: Practitioner
Category of MCQ: typecasting in C++

Question: 108

(A) True
(B) False



Level: Practitioner
Category of MCQ: exceptions in C++

Question: 109

(A) True
(B) False



Level: Practitioner
Category of MCQ: exceptions in C++

Question: 110

(A) True
(B) False



Level: Practitioner
Category of MCQ: exceptions in C++

Question: 111

(A) True
(B) False



Level: Practitioner
Category of MCQ: exceptions in C++

Question: 112

(A) Function declaration has error
(B) Behaviour is unknown
(C) Function will throw only standard exceptions defined in <exception>
(D) Function will not throw any exception



Level: Practitioner
Category of MCQ: exceptions in C++

Question: 113

(A) Equal
(B) EqualEqual
(C) EqualNotEqual
(D) NotEqual



Level: Practitioner
Category of MCQ: conditional in C++

Question: 114

(A) Program is terminated without printing anything on console
(B) Prints 'constructor' and then it is terminated
(C) constructor.destructor. but ptr is never freed
(D) constructor.destructor. And ptr is freed



Level: Practitioner
Category of MCQ: pointers in C++

Question: 115

(A) C++11's weak_ptrs are used with shared_ptrs.
(B) C++11's weak_ptrs can be used without weak_ptrs
(C) C++11's weak_ptrs are replacement of unique_ptr
(D) C++11's weak_ptrs are used for unique ownership



Level: Practitioner
Category of MCQ: pointers in C++

Question: 116

(A) We can only use these smart pointers to refer to objects allocated with new
(B) It is recommended that you do not use both 2 shared_ptr and raw pointer on the same object
(C) It can't be copied or assigned to another shared_ptr
(D) We can also reset a shared_ptr by assigning it the value nullptr



Level: Practitioner
Category of MCQ: pointers in C++

Question: 117

(A) This is valid code snippet with no error
(B) Error: Copy construction is not allowed at line 2
(C) Error: Assignment is not allowed at line 2
(D) Error: Runtime exception



Level: Practitioner
Category of MCQ: pointers in C++

Question: 118

(A) bad_exception
(B) overflow_error
(C) out_of_range
(D) bad_alloc



Level: Practitioner
Category of MCQ: new_delete in C++

Question: 119

(A) 08
(B) 04
(C) 84
(D) 48



Level: Practitioner
Category of MCQ: inheritance in C++

Question: 120

(A) base
(B) Nothing is printed
(C) basebase
(D) None of the Above



Level: Practitioner
Category of MCQ: inheritance in C++

Question: 121

(A) Hello Derived
(B) Hello Base
(C) Hello Derived Hello Base
(D) Hello Base Hello Derived



Level: Practitioner
Category of MCQ: typecasting in C++

Question: 122

(A) Hello Derived
(B) Hello Base
(C) Hello Derived Hello Base
(D) Error: not matching func to call ‘derived::derived(cppbuzz_base&)’



Level: Practitioner
Category of MCQ: typecasting in C++

Question: 123

(A) Both pointers hold same object
(B) They don't hold same object
(C) Compilation Error
(D) Exception occured



Level: Practitioner
Category of MCQ: singleton in C++

Question: 124

(A)
(B)
(C)
(D)



Level: Practitioner
Category of MCQ: singleton in C++

Question: 125

(A) error: cannot declare variable ‘obj’ to be of abstract type ‘cppbuzz’
(B) cppbuzz
(C) ~cppbuzz
(D) cppbuzz~cppbuzz



Level: Practitioner
Category of MCQ: abstract_class in C++

C++ Online Test
Compile C++ code here

Browse C++ Categories

Loops Conditional Functions Operators Structure Enum Data Types Inheritance Pointers Classes & Objects Vtable Type Casting New & Delete Namespaces Virtual Functions Abstract Class STL Singleton Class Exceptions C++11 C++17 C++20 Time & Space Complexity others

Switch to C Questions

MCQs

About Us | Contact Us | Privacy Policy | Career  | Online Training
Youtube   LinkedIn   Facebook   Twitter   Instagram  
Copyright©CppBuzz.com
Like many websites, we use cookies to ensure best browsing experience on our website. While using this website, you acknowledge to have read and accepted our cookie and privacy policy.