Can anyone explain me data types in elaborative way given in C language in SoloLearn ? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Can anyone explain me data types in elaborative way given in C language in SoloLearn ?

I am new coder and I didn't get the data types given in C language in sololearn.

10th Jan 2019, 2:24 AM
Yash Thakkar
Yash Thakkar - avatar
1 Answer
+ 2
A list of data types: int; integer; a whole number, can be either positive or negative, e.g: 0, 5, 10, -20 float; is a real number e.g: 0.5, 10.1, 15.5 (single float precision of 4 bytes) double; also a real number like a float e.g: 0.5, 10.1 (double precision float of 8 bytes) char; is used for declaring a single character with single quotes: e.g 'a'. void; means nothing or no type. If functions don't return anything it should be void; you can't declare a variable as a void. bool; is a Boolean which can either be true or false (used for comparing) e.g 1 == 2 is false. enum; consists of integral constants: e.g enum num {1, 2, 3, 4} long; this is used for large numbers note; you can use long and double for declaration; long double a = 1; short; used for small numbers same as long but small numbers (range: −32,767, +32,767) that's about it for the basics, not including arrays or any of that fizzle Hope it helps!
10th Jan 2019, 7:27 PM
Joery De Loose
Joery De Loose - avatar