did not include header file

Ambitious contributor
19Dec2007,10:26   #1
answerme's Avatar
Code:
main()
{
  const int Men   = 10;
  int       *Women = &Men;

  *Women = 20;

  printf("There are %d men\n", Men);
  
}
I havent include #include header file but still prg is running how is it possible.
Ambitious contributor
19Dec2007,12:51   #2
Salem's Avatar
You got lucky. The compiler's guess as to what the function prototype should be was close enough to its actual declaration to produce something which worked.

Do you understand my sig yet?
Ambitious contributor
19Dec2007,15:29   #3
answerme's Avatar
To be honest NO ,could elaborate more
Ambitious contributor
19Dec2007,19:50   #4
Salem's Avatar
It's really saying that to be successful (long term) in your programs, you need to be good, not just lucky. C often lures you in with early success, despite making a catalogue of errors. But in larger programs, even the tiniest mistake will be punished harshly.

Like dancing on broken glass, sometimes you get away with it and at some other time, you're lying in ER suffering from severe blood loss.