#include <stdio.h> #include <string.h> main() { char ab[100]="asdfasd",ac[100]; printf("%d %d\n",ab,ac); //ac=ab 由于ab,ac分别为两个数组的起始地址,所以该句有语法问题 //字符数组相互赋值可用strcpy(ac,ab) strcpy(ac,ab); puts(ac); getchar(); }
标签:字符,ac,ab,C语言,数组,赋值 From: https://www.cnblogs.com/xkdn/p/16757901.html