On running the following code:
int main()
{
int a = sizeof(signed) + sizeof(unsigned);
int b = sizeof(const) + sizeof(volatile);
printf("%d",a+++b);
return 0;
}
in visual c++, I get an output as 16. Is the default data type of signed, unsigned, const and volatile considered int?
Its not just these qualifiers, the default type of C language is int. So if you dont specify data type at someplace, the compiler will assume int.
For example if you don’t declare a function and use it, the compiler will give you a warning and assume that the function returns int.