C++ Multiple Choice Questions for Experts

Home » C++ » Questions 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);

Compiler
Level: Expert Category: other
[Posted by: | ]


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

Compiler
Level: Expert Category: cpp11
[Posted by: | ]


Question: 28

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

Compiler
Level: Expert Category: other
[Posted by: | ]


Question: 29

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

Compiler
Level: Expert Category: gcc_g++
[Posted by: | ]


Question: 30

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

Compiler
Level: Expert Category: structure
[Posted by: | ]


Question: 31

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

Compiler
Level: Expert Category: structure
[Posted by: | ]


Question: 32

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

Compiler
Level: Expert Category: structure
[Posted by: | ]


Question: 33

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

Compiler
Level: Expert Category: cpp11
[Posted by: | ]


Question: 34

(A) Yes
(B) No

Compiler
Level: Expert Category: cpp11
[Posted by: | ]


Question: 35

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

Compiler
Level: Expert Category: filehandling
[Posted by: | ]


Question: 36

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

Compiler
Level: Expert Category: gcc_g++
[Posted by: | ]


Question: 37

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

Compiler
Level: Expert Category: other
[Posted by: | ]


Question: 38

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

Compiler
Level: Expert Category: cpp17
[Posted by: | ]


Question: 39

(A) Yes
(B) No

Compiler
Level: Expert Category: cpp17
[Posted by: | ]


Question: 40

(A) Yes
(B) No

Compiler
Level: Expert Category: cpp17
[Posted by: | ]


Question: 41

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

Compiler
Level: Expert Category: cpp14
[Posted by: | ]


Question: 42

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

Compiler
Level: Expert Category: cpp20
[Posted by: | ]


Question: 43

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

Compiler
Level: Expert Category: cpp20
[Posted by: | ]


Question: 44

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

Compiler
Level: Expert Category: cpp20
[Posted by: | ]


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());

Compiler
Level: Expert Category: cpp11
[Posted by: | ]


Question: 46

(A) TRUE
(B) FALSE

Compiler
Level: Expert Category: filehandling
[Posted by: | ]


Question: 47

(A) True
(B) False

Compiler
Level: Expert Category: exceptions
[Posted by: | ]


Question: 48

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

Compiler
Level: Expert Category: inheritance
[Posted by: | ]


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

Compiler
Level: Expert Category: pointers
[Posted by: | ]


Question: 50

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

Compiler
Level: Expert Category: abstract_class
[Posted by: | ]


Question: 51

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

Compiler
Level: Expert Category: classesAndobjects
[Posted by: | ]


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.