No, no. What do you mean by I am taking this from Wikipedia? Of course not, why are you accusing me?
Ok, moving on.
C data types is the kind of data that you use for a variable. Variable here is a name for a thing. To make this thing not-quite-wide in terms of ‘what is this’, we use data types to converge this wideness.
There is basic data types, and advanced data types.
Basic data types
char is basically a character. That’s it. One single character.
int is short for integer. int is VERY WIDELY used for data types, due to its very simple name and people is very lazy to do other variable as a number. Yeah, this is widely used for number, what do you expect from an integer? int can hold from -2^32 ~ 2^32-1 , any number around that, is okay. More or less than that, is not okay.
Basically an integer but shorter. As the name says. short is just useless unless you have a fucking DOS computer with vibrating floppy disk and 1 GHz processor.
Oh you need a number more than 2^32? Don’t worry, we have ‘long’ here. long is used when int doesn’t satisfy you. long is a long version of int.
- long long
OH YOU STILL NEED BIGGER NUMBER THAN LONG HAS? Well, I introduce you, ‘long long’, the tall old cousin that holds very fucking huge-ass number, from −9,223,372,036,854,775,807 to +9,223,372,036,854,775,807. COUGH COUGH sorry I have an allergic to indistinguishable numbers.
What would you do if you want to make a number that is not round? I mean, say you want a 2.5. How the hell do you do that? Introducing, float, now without coca-cola, ice cream on top, ice, cup, basically not a drink. float is used when you need number with decimals behind.
Every number data type you just read, can be modified with special word.
Unsigned <the number data types> is basically the same size with your normal number data types, BUTT take every possible number on the negative side, move it in front of the maximum number, so you now have DOUBLE (2x) the normal data type. For example:
unsigned long long oohohohohohoho this is so huge like my.. nvm
Normal long long: −9,223,372,036,854,775,807 to +9,223,372,036,854,775,807
Unsigned long long: 0 to +18,446,744,073,709,551,614. WOOOOOW
Now that’s it for now. Don’t wait for me to post another thing again. I have an exam 😦