C++ Multiple Choice Questions for Experts

Home » C++ » MCQs for Experts

Page 2 (26 - 51)


Question: 26

(A) t.foo template<U>(u);
(B) t.foo<typename U>(u);
(C) t.template foo<U>(u);
(D) typename t.foo<U>(u);


Level: Expert
Category of MCQ: other in C++

Question: 27

(A) g++ -std=c++-11 -o output.out source.cpp
(B) g++ -std=c++11 -o output.out source.cpp
(C) g++ -std=c++ 11 -o output.out source.cpp
(D) g++ -std=cpp11 -o output.out source.cpp


Level: Expert
Category of MCQ: cpp11 in C++

Question: 28

(A) Filename
(B) First argument
(C) Last argument
(D) NULL pointer


Level: Expert
Category of MCQ: other in C++

Question: 29

(A) nmake -f myfile option
(B) nmake -f opiton myfile
(C) nmake option -f myfile
(D) nmake option -fname myfile


Level: Expert
Category of MCQ: gcc_g++ in C++

Question: 30

(A) 4
(B) 6
(C) 8
(D) 12


Level: Expert
Category of MCQ: structure in C++

Question: 31

(A) 4
(B) 6
(C) 8
(D) 12


Level: Expert
Category of MCQ: structure in C++

Question: 32

(A) 4
(B) 6
(C) 8
(D) 12


Level: Expert
Category of MCQ: structure in C++

Question: 33

(A) Yes
(B) No
(C) Depends on Compiler


Level: Expert
Category of MCQ: cpp11 in C++

Question: 34

(A) Yes
(B) No


Level: Expert
Category of MCQ: cpp11 in C++

Question: 35

(A) ios::out | ios::in
(B) ios::out, ios::in
(C) ios::out || ios::in
(D) ios::out & ios::in


Level: Expert
Category of MCQ: filehandling in C++

Question: 36

(A) g++ -o <filename>
(B) g++ -c <filename>
(C) g++ <filename>
(D) g++ -f <filename>


Level: Expert
Category of MCQ: gcc_g++ in C++

Question: 37

(A) Normal Data Section
(B) Un initialized data section
(C) Initialized data section
(D) None of the above


Level: Expert
Category of MCQ: other in C++

Question: 38

(A) std::variant
(B) std::optional
(C) std::string_view
(D) None of the above


Level: Expert
Category of MCQ: cpp17 in C++

Question: 39

(A) Yes
(B) No


Level: Expert
Category of MCQ: cpp17 in C++

Question: 40

(A) Yes
(B) No


Level: Expert
Category of MCQ: cpp17 in C++

Question: 41

(A) C++11
(B) C++14
(C) C++ 17
(D) C++20


Level: Expert
Category of MCQ: cpp14 in C++

Question: 42

(A) C++11
(B) C++14
(C) C++17
(D) C++20


Level: Expert
Category of MCQ: cpp20 in C++

Question: 43

(A) C++11
(B) C++14
(C) C++17
(D) C++20


Level: Expert
Category of MCQ: cpp20 in C++

Question: 44

(A) C++11
(B) C++14
(C) C++17
(D) C++20


Level: Expert
Category of MCQ: cpp20 in C++

Question: 45

(A) std::thread threadObj(thread_function);
(B) std::thread threadObj(&thread_function);
(C) std::thread threadObj((void *)thread_function);
(D) std::thread threadObj(thread_function());


Level: Expert
Category of MCQ: cpp11 in C++

Question: 46

(A) TRUE
(B) FALSE


Level: Expert
Category of MCQ: filehandling in C++

Question: 47

(A) True
(B) False


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

Question: 48

(A) 100
(B) 0
(C) Compilation Error
(D) Garbage Value is printed


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

Question: 49

(A) We can't transfer the ownership of unique pointers
(B) It is possible using copy constructor - unique_ptr<Thing> ptr2(ptr1);
(C) ptr2 = std::move(ptr1);
(D) ptr2 = ptr1


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

Question: 50

(A) 4
(B) 8
(C) 12
(D) 16


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

Question: 51

(A) Compilation Error
(B) 10, 20
(C) 10, 10
(D) 10, Undfefined Value


Level: Expert
Category of MCQ: classesAndobjects 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.