I tried the below c program & I expected to get compile time error, but why compiler isn\'t giving any error?
#include
int main(void)
{
This compiles well. Because it matches the printf() prototype which is
printf(const char *,...);
During run-time the call
printf("%d\n");
Tries to fetch the value from second argument and since you have not passed anything it might get some garbage value and print it out so the behavior is undefined here.