c-data type-format specifiers-use of %hhd | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

c-data type-format specifiers-use of %hhd

i cant understand '%hhd' usage, please someone help

22nd May 2020, 10:32 AM
Kingsly Andrews M
Kingsly Andrews M - avatar
2 Answers
+ 1
I know that's why i used short int just a indication of how many values you can use ,you can even use int %d will refer to storage size of 2-4 bytes %hd refers to storage size of 2 bytes so obviously even if it isn't specified, %hhd refers to storage size of 1 byte which is -128 to+127 as I have depicted in my example,you can do a little more search on net and you will find that %hhd stands for short short int
22nd May 2020, 3:53 PM
Abhay
Abhay - avatar
0
It stands for short short int ,so the value range for it is -128,+127 short int c=128; printf("%hhd",c);
22nd May 2020, 10:44 AM
Abhay
Abhay - avatar