DEV Community

Kerimova_Manzura
Kerimova_Manzura

Posted on

C++ Variables

Variables are containers for storing data values.

In C++, there are different types of variables (defined with different keywords), for example:

  • int - stores integers (whole numbers), without decimals, such as 456 or -456.

  • double - stores floating point numbers, with decimals, such as 25.27 or -25.27.

  • char - stores single characters, such as 'a' or 'B'. Char values are surrounded by single quotes.

  • string - stores text, such as "Hello World". String values are surrounded by double quotes.

  • bool - stores values with two states: true or false

Top comments (1)

Collapse
 
denim06111991 profile image
denim06111991

Quite a well written article @manzura07

We are in the process of updating some books under our C++ portfolio. Over the next few weeks I am conducting a research in the C++ space to discover the top issues that C++ developers/programmers/experts like yourself are dealing with. We are reaching out to users to understand their needs/expectations and what they are looking for in C++ space.

After reviewing your profile, I believe that you could help me to gain a thorough understanding of what is working and not working for C++ developers like you.

Would you be happy to join me for a 10-minute call to discuss on how we can improvise our C++ books? Your inputs will be critical for us to bring forward a top-notch product for the C++ enthusiasts.