I saw some code which used sizeof directly and wondered if it is standard C. To my surprise, it was working just fine. Here is an example:
#include <stdio.h>
#include <string.h>
int main()
{
char buff[255];
printf("size %d\n", sizeof buff);
return 0;
}
Output: size 255
As you can see, in the above example I used sizeof <variable>
instead of sizeof(<variable>)
Please throw more light on it.