Hello, the exercise in my book is very clear, write a function that returns the copy of a certain string using pointers. I wrote the function, but I don't know how to call it to test it if I've done it right or not. Here's my code:
It is simply to do by comparing the source string with the built string.
1 2 3 4 5
// here I need to call the function
char *new_string = strcpy( string );
if ( strcmp( string, new_string ) == 0 ) puts( "The strings are equal." );
else puts( "Oops. There is an error somewhere." );