C++ Variables and Data Types

Last Updated :
Discuss
Comments

Question 1

Which is a valid C++ data type?

  • integer

  • float

  • number

  • real

Question 2

What does the const keyword do?

  • Allocates dynamic memory

  • Makes a variable modifiable

  • Defines a function

  • Prevents variable modification

Question 3

What is the purpose of the auto keyword?

  • Declares a constant

  • Deduces variable type

  • Allocates memory

  • Defines a loop

Question 4

What is a constexpr used for?

  • Runtime evaluation

  • Compile-time evaluation

  • Dynamic memory allocation

  • Function definition

Question 5

What is the purpose of a variable in C++?

  • To repeat a set of instructions multiple times

  • To store data that can be used and modified during program execution

  • Define functions

  • To define reusable blocks of code

Tags:

There are 5 questions to complete.

Take a part in the ongoing discussion