- Get link
- X
- Other Apps
COMMON VARIABLES IN C AND C++
Variables are containers for storing data values.There are many variables in c and c++. But there are 6 common types of variables in C and C++. They are:
1. Integer. Integer stores whole numbers without decimals like 1234.
2. Double. Double stores fractional numbers, containing one or more decimals. Double can store 15 decimal digits.
3. Float. Float stores fractional numbers, containing one or more decimals. Float can store 7 decimal digits. It is safe to use double than float because it can store more digits.
4. Char. Char stores single characters like 'a' or 'B'. They are surrounded by single quotes.
5. String. String stores text like "Hello". String values are surrounded by double quotes.
6. Boolean. Boolean stores values with true or false.
- Get link
- X
- Other Apps
