C Program will not compile [closed]

Well it says clearly what is the problem. You need to use the function strcpy there is nothing called strcopy in standard library – and the corresponding implicit declaration considered by compiler is invalid – it complained. Actually C99 doesn’t allow implicit declaration – it showed error that’s why.

Other options is to declrare the function strcopy and then define it before you use it.

Also another thing is how you use strcpy – You have passed as both parameter the string literals modifying which is undefined behavior. Not sure what purpose it will serve, given the fact that in general we copy string pointed by dest to src in strcpy. (src is the second parameter, dest is the first one).

Leave a Comment