Skip to main content

C++11/14/17/20 Features

1).What new feature was introduced in C++11?

1) Lambda functions
2) Range-based for loops
3) Move semantics
4) All of the above

2).What is 'auto' keyword used for in C++11?

1) Automatic type deduction
2) Declaring variables
3) Dynamic memory allocation
4) None of the above

3).What is the 'nullptr' keyword in C++11?

1) A type-safe null pointer constant
2) A reference to null
3) An undefined pointer
4) None of the above

4).Which of the following features was added in C++14?

1) Lambda expression return type deduction
2) constexpr variables
3) Explicit casting
4) None of the above

5).Which feature was introduced in C++17?

1) std::filesystem
2) std::optional
3) Structured bindings
4) All of the above

6).Which feature is introduced in C++20?

1) Modules
2) Concepts
3) Coroutines
4) All of the above

7).What is the purpose of 'std::optional' in C++17?

1) To represent an object that may or may not have a value
2) To represent null objects
3) To represent a collection of values
4) None of the above

8).What does 'std::byte' represent in C++17?

1) A byte of memory
2) A reference to a byte
3) An object of type byte
4) None of the above

9).What feature does 'std::coroutine' in C++20 provide?

1) Asynchronous programming
2) Synchronous programming
3) Both synchronous and asynchronous
4) None of the above

10).What is the 'concepts' feature in C++20?

1) A way to constrain template parameters
2) A new data structure
3) A new type of pointer
4) None of the above