将一个已知字符串a第n个字符开始的剩余字符复制到另外一个字符串b中

如题所述

#include <stdio.h>
#include<string.h>

fun(char *s,char *t,int n)
{
    
    
    while(*t=*(s+n))
    {
        
        t++;
        n++;
    }
    puts(s);
}

void main()
{
    char a[20],b[80];
    int n;
    printf("你要输入啥字符啊");
    gets(a);
     printf("n是多少啊%d",&n);
    fun(a,b,n);
    
}

温馨提示:答案为网友推荐,仅供参考
第1个回答  2018-12-26
char* my_strcpy(char* des,const char* source,int num)
{
 
  char* r=des;
  
  assert((des != NULL) && (source != NULL));

  source = source + num;

 while((*r++ = *source++)!='\0');

 return des;
 
}

相关了解……

你可能感兴趣的内容

本站内容来自于网友发表,不代表本站立场,仅表示其个人看法,不对其真实性、正确性、有效性作任何的担保
相关事宜请发邮件给我们
© 非常风气网