Have you ever wondered why people uses different keywords to define the same variable in C or C++ program?
Sometimes you would have noticed that 8 bit variable has been defined as
unsigned char a;
uint8_t b;
Also, many a times you would notice integer has been defined as
unsigned int c;
uint16_t d;
uint32_t e;
Initially when I was in the learning phase of C programming with microcontrollers, I used to get confused, what to use when.
Sometimes you would have noticed that 8 bit variable has been defined as
unsigned char a;
uint8_t b;
Also, many a times you would notice integer has been defined as
unsigned int c;
uint16_t d;
uint32_t e;
Initially when I was in the learning phase of C programming with microcontrollers, I used to get confused, what to use when.