Major features introduced in C++20 are Spaceship operator, Modules, Concepts, Ranges, Coroutines, Calendar, Time zone, Constexpr, Span, Atomic_ref, Format, Tuple, Using etc.

Question: 1

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

Ans: B

Level: Expert Category: cpp20

Question: 2

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

Ans: B

Level: Expert Category: cpp20

Question: 3

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

Ans: A

Level: Expert Category: cpp20

Question: 4

(A) p1 is less than p2 (B) p1 is greater than p2 (C) p1 is equal to p2 (D) Compilation Error

Ans: B

Hint: C++ 20 spaceship operator <=> can be used to compare objects.

Level: Experts Category: cpp20

Question: 5

(A) p1 is less than p2 (B) p1 is greater than p2 (C) p1 is equal to p2 (D) Compilation Error

Ans: A

Hint: C++ 20 spaceship operator <=> can be used to compare objects.

Level: Expert Category: cpp20

Question: 6

(A) 8 (B) 7 (C) 5 (D) 2

Ans: D

Hint: C++20 introduces new utilities for bitwise manipulation, such as bit-level operations, counting leading/trailing zeros, and finding population count.

Hint: A Lambda function can take another lamda function argument

Level: Practionar Category: cpp20

Question: 9

(A) True (B) False (C) 1 (D) Compilation Error

Ans: C

Hint: auto&& b; If the initializer is an lvalue, a will be deduced as an lvalue reference. If the initializer is an rvalue, a will be deduced as an rvalue reference.