{
Char * STR;//character pointer to the string
Intct;//the length of the string
};
//define functions setshow
Voidset ()//add function parameter
{
Inti=0;
For (; PSTR [I]; I++)
STR. Ct=I;
STR. STR=newchar [I];
//3 added code as required
}
Voidshow ()//supplement parameter and execute code
Voidshow ()//supplement parameter and execute code
Intmain ()
{
STRINGstr;
Charstr_1 []="helloworld";
Set (STR, str_1);//note: (1) the first parameter is the reference
//(2) in the distribution of space to the STRING STR (3) make a copy of data in a str_1 to STR
//(4) evaluate ct=string size
Show (STR);//output STR string
Show (STR, 3);//output STR before three characters
Show (str_1);//output str_1
Show (str_1, 3);//output str_1 before three characters
Show (" finished ");
Return0;
}
no
CodePudding user response:
Someone, please someone helpCodePudding user response:
Someone is anyone hereCodePudding user response:
You come and helpCodePudding user response:
What are the requirements for???