Im newcomer in coding (Only a bit foreknowledge) and Im trying to figure out the basics of C language. I have read some tutorials and example codes, but Im still wondering:
What are those buddies called int, char, long and etc.
As I understand, int, for example, is a part of a code that specifies how a variable is saved in the memory of MCU. Int gives variable type of integer, right? If this is wrong, please correct it.
But; When to use int, when to use char? What is the difference of using int or char? As I have understood in this case, they have only difference in capacity of memory (bits). Why wouldn't all be in same size? Does the code act in different way if I use char instead of int?
How about crossing different kind of variables? I mean:
int _k = 1
_i = _k
Is that illegal? Have I committed a crime?
If someone pro could explain more of these things, I would appreciate it.