This video lecture is all about data types and variables in c++ programming language.
Data types define the type of data a variable can hold, for example an integer variable can hold integer data, a character type variable can hold character data etc.
watch our first video tutorial
How to install Dev C++ IDE
• How to instaal Dev C++ IDE
Data types in C++ are categorised in three groups: Built-in, user-defined and Derived.
data types in c++
Built in data types
char: For characters. Size 1 byte.
char ch = 'A';
int: For integers. Size 2 bytes.
int num = 100;
float: For single precision floating point. Size 4 bytes.
float num = 123.78987;
double: For double precision floating point. Size 8 bytes.
double num = 10098.98899;
bool: For booleans, true or false.
bool b = true;
User-defined data types
We have three types of user-defined data types in C++
1. struct
2. union
3. enum
Derived data types in C++
We have three types of derived-defined data types in C++
1. Array
2. Function
3. Pointer
Variables are containers for storing data values.
In C++ there are different types of variables, for example:
String - stores text, such as "Hello".
int - stores integers (whole numbers), without decimals, such as 123 or -123
float - stores floating point numbers, with decimals, such as 19.99 or -19.99
char - stores single characters, such as 'a' or 'B'. Char values are surrounded by single quotes
bool - stores values with only two states: true or false
hat are data types and variables in c++,
how to use variables and datatypes,
c++ data types,c++ variables,
how to implement datatypes in c++,
what are the different datatypes in c++,
what are variables,why we use variables,
datatypes and variables in java,
datatypes and variables in python,
datatypes and variables in php,
datatypes and variables in c#,
datatypes and variables in kotlin,
c++ basic datatypes and variables,
what is integer string long float boolean char,
how to store data in variables,
c++ programming,learn c++,
c++ tutorials,
c++ programs, c++ video lectures,
c++ tutorial playlist, c++ for beginners,
c++ for intermediate,
programming for beginners,
c++ tutorial series ,what is c++,