why not ptr=add(int x,int y); //add is a function we cant hide its signature
//what if there were two add function but with different signatures
//in such case this line will create an error
??
Because that is a declaration, not an assignment.
It's also possible to create several functions with different parameter lists (with the same name). It's called overloading and is available in C++, but not C.
Originally Posted by Adak
io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
Originally Posted by Salem
You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.
Outside of your DOS world, your header file is meaningless.
Well it isn't a declaration either (just to be clear). The code is a mistake if we want to call it anything. The reason you can't do that is because it isn't a valid C statement, and that will stop the compiler every time.