Microcontroller › PIC › Is that integer size would be differ for every 16bit,32bit controller › HiWhile coding if you make
Hi
While coding if you make use of an integer variable then it's size will remain fixed, it will not change according to the microcontroller you use. Generally an unsigned it in allocated 4 bytes but what if you do not want that much space, well there is a provision in coding language to change the size of integer variable as per your requirements.
So If you want to store values in integer variable upto 8 bits you can initialize your variable by writing uint_8t variable_name. Similarly for for 16,32 and 64 bit variable you will initialize variable like: uint_16t, uint_32t and uint_64t respectively. For signed integer variables you can omit u in the begining.