首页 > 编程知识 正文

前端手写题,c语言指针笔试题

时间:2023-05-03 19:49:35 阅读:258511 作者:305

#include <stdio.h>char* strcpy(char *a,const char *b){ //用指针偏移 if(a==NULL||b==NULL) return NULL; while((*a++=*b++)!=''); return a;}int main(){ char p[5]="abcd"; const char *q="ABCD"; strcpy(p,q); printf("%s",p);}

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。