CONFUSED | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

CONFUSED

why char not int ? why int not char ?

29th Dec 2016, 6:05 AM
Muhammad G.P
Muhammad G.P - avatar
1 Answer
+ 6
Each data type denotes what a variable contains. You select based on what you need to store. int is for whole numbers, or integers. char is for a single character (letter, number, symbol, etc.). double is for numbers with decimals.
29th Dec 2016, 7:49 AM
Tamra
Tamra - avatar