Home > Back-end >  Bosses help! C language programming problem: string s from beginning to end to end - 1 subscript beg
Bosses help! C language programming problem: string s from beginning to end to end - 1 subscript beg

Time:06-03

Specific requirements are as follows:

CodePudding user response:

Top bosses see trouble,

CodePudding user response:

Yang children, the eldest brother

CodePudding user response:

Your code? A line of all didn't write

CodePudding user response:

reference weixin_40290083 reply: 3/f
your code? A line didn't write the

I solved, done ~ thank you for your attention
 # include & lt; Stdio. H> 
#include
Typedef unsigned long size_t;
Void pick (char * s, char * sub, int beg, int the end, int step) {
Int I, j=0;
For (=I beg; I & lt; end; I +=step) {
Sub [j++] [I]=s;
}
While (sub) [j] {
Sub [j]='\ 0';
j++;
}
}
Size_t len (char * s) {
Int I=0, n=0;
For (; S [I]; I++) {
n++;
}
Return n.
}
Int main () {
Char * s="Stringhandling";
Char * t=(char *) malloc (sizeof (char) * len (s));
Pick (s, t, 2, 8, 2);
Printf (" % s \ n ", t);
Free (t);
return 0;
}

CodePudding user response:

I hope it can help you: https://blog.csdn.net/it_xiangqiang/category_10581430.html
I hope it can help you: https://blog.csdn.net/it_xiangqiang/category_10768339.html
  • Related