Hi
int variable take four byte, short int take two byte and long int take eight bytes
the same char takes one byte so long char should be take 2 bytes
so I wrote program to get result
Code:
#include <stdio.h>
int main()
{
char x;
// short char y;
long char z;
printf("size of int = %d \n", sizeof(x));
// printf("size of short int = %d \n", sizeof(y));
printf("size of long int = %d \n", sizeof(z));
return 0;
}
error: both ‘long’ and ‘char’ in declaration specifiers long char z;
^~~
Does this mean that short / long cannot be used with char?