The C standard does not specify the sizes of data types. It specifies only the minimum sizes in terms of bits. sizeof(char) is always 1 "sizeof units" (not necessarily bytes) by definition. Sizes of all other types are relative to that.
You mention float in addition to double, but don't mention either short or long. You also don't mention any of the unsigned versions. You don't mention that char may be either signed or unsigned.
Thanks for your valuable comment. In this post i only have mentioned the basic datatypes and format specifiers that is used commonly. More detailed posts will be released in the upcoming days.
In general when writing a technical post, if you intentionally don't cover all the details, you should say it and whether more details are coming later.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
The C standard does not specify the sizes of data types. It specifies only the minimum sizes in terms of bits.
sizeof(char)is always 1 "sizeof units" (not necessarily bytes) by definition. Sizes of all other types are relative to that.You mention
floatin addition todouble, but don't mention eithershortorlong. You also don't mention any of theunsignedversions. You don't mention thatcharmay be either signed or unsigned.There are many for format specifiers; see here.
Thanks for your valuable comment. In this post i only have mentioned the basic datatypes and format specifiers that is used commonly. More detailed posts will be released in the upcoming days.
In general when writing a technical post, if you intentionally don't cover all the details, you should say it and whether more details are coming later.