#include <stdio.h>
int main()
{
int a;
printf("%d\n",a);
}
The statement in the above example: int a;
— is it a declaration or definition? If it is a declaration, the printf()
statement should give an error, but it prints a garbage value. So we cannot call it a declaration. But as per the syntax it is a declaration. So what is the difference in this case?