Trusted answers to developer questions
Trusted Answers to Developer Questions

Related Tags

general
community creator

What are variable types?

Mohammad Razi ul Haq

Variables are named memory locations used to store data. These memory locations are reserved and can be manipulated by programs during run-time. By defining a variable, we allocate a memory location that can store various types of data. These data types define how much memory we are reserving out of the total allocated memory.

v1 is a reserved portion of memory to store data.

Below are some of the variable types generally used in programming:

Type Description
char Used to store one byte of data. The data type of this kind of variable is “integer”.
int Used to store whole numbers.
float Used to store fractional numbers with 6 to 7 decimal digits.
bool Used to store True or False values.
double Used to store floating point numbers with double the precision of floats.

RELATED TAGS

general
community creator

CONTRIBUTOR

Mohammad Razi ul Haq
RELATED COURSES

View all Courses

Keep Exploring