Home > Back-end >  The small white for help
The small white for help

Time:09-28

Small white help
# include
Int main ()
{
Void copy_string (char from [], char to []);
Char a []="I am a to the teacher.";
Char [b]="You are a student.";
Printf (" string a=% s \ nstring b=% s \ n ", a, b);
Printf (" copy the string a to string b: \ n ");
Cpoy_string (a, b);
Printf (" \ nstring \ nstring b=a=% s % s \ n ", a, b);
return 0;
}
Void copy_string (char from [], char to [])
{
int i=0;
While (the from [I]!='\ 0')
{
The to [I]=the from [I];
i++;
}
[I]='\ 0'),
}

Prompt error undefined reference to ` cpoy_string '
I'm reading is also the same, why not defined

CodePudding user response:

 cpoy_string (a, b);//not a cpoy is copy 

Spelling error:

CodePudding user response:

The
reference 1/f, confident boy reply:
 cpoy_string (a, b);//not a cpoy is copy 

Spelling error:

Ah, found the , thank you thank you

CodePudding user response:

 
# include & lt; stdio.h>
# include & lt; Stdlib. H>

Int main ()
{
Void copy_string (char from [], char to []);
Char a []="I am a to the teacher.";
Char [b]="You are a student.";
Printf (" string a=% s \ nstring b=% s \ n ", a, b);
Printf (" copy the string a to string b: \ n ");
Copy_string (a, b);//note is copy_string
Printf (" \ nstring \ nstring b=a=% s % s \ n ", a, b);
return 0;
}
Void copy_string (char from [], char to [])
{
int i=0;
While (the from [I]!='\ 0')
{
The to [I]=the from [I];
i++;
}
[I]='\ 0'),
}

  • Related