Hi all, Today while studying a book i just saw the following lines of code: int main(void) { int printf(const char *n,...); int a=1; printf("abcdef"); return 0; }
and the output was: abcdef When i tried to run this code, it ran well without any error and this was asked in GATE exam also. I am confused, how it ran without <stdio.h>, when i used printf() function and gave the same output as printf gives. Okay after that i commented the third line "int printf(const char *n,....);", the output didn't get affected. Now i am thinking when we can use printf() function without any prototype or defining any header, then why do we need to use #include<> in our program, because when i changed this program a bit by substituting printf() with scanf() it worked fine like scanf() does normally. Can anyone explain me,what is this? Thanks _______________________________________________ Ilugd mailing list Ilugd@lists.linux-delhi.org http://frodo.hserus.net/mailman/listinfo/ilugd