Home > Back-end >  Someone help you, just learn c, what is not
Someone help you, just learn c, what is not

Time:10-03

StructSTRING
{
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 help

CodePudding user response:

Someone is anyone here

CodePudding user response:

You come and help

CodePudding user response:

What are the requirements for???
  • Related