#include<stdio.h>
int main()
{
printf("\nsize of int : %d", sizeof int);
return 0;
}
is returning error
error: expected expression before ‘int’
while compiling with C and
expected primary-expression before ‘int’
while compiling with C++, but the following codes works just fine.
#include<stdio.h>
int main()
{
int b;
printf("\nsize of int : %d", sizeof b);
;
return 0;
}
Why is it so? What is the difference in both the cases?