Re: [algogeeks] Re: function overloading query

2011-11-22 Thread Jagannath Prasad Das
What this means compiler looks for closest possible match ,then other alternatives.In this func(char*) is executed if that is not there then func(const char*) is executed. Comment the func(char*) and check.There is no overloading in c as far i know. On Tue, Nov 22, 2011 at 10:11 PM, Jagannath Pras

Re: [algogeeks] Re: function overloading query

2011-11-22 Thread Jagannath Prasad Das
Run this one: #include void fun(const char *p) { printf("const\n"); } void fun(char *P) { printf("simple\n"); } int main(void) { char str[] = "funcheck"; //const char str1[] = "constcheck"; fun(str); fun(str); } On Tue, Nov 22, 2011 at 7:13 PM, MJ wrote: > Hi > This type of functi