#include <stdio.h>
#include <string.h>
int main(int argc, const char *argv[])
{
char a[32] = "hello";
char b[] = "world shijie";
int i = 0;
while(b[i] != '\0')
{
a[i] = b[i];
i++;
}
a[i] = '\0';
printf("a = %s\n",a);
return 0;
}
#include <string.h>
int main(int argc, const char *argv[])
{
char a[32] = "hello";
char b[] = "world shijie";
int i = 0;
while(b[i] != '\0')
{
a[i] = b[i];
i++;
}
a[i] = '\0';
printf("a = %s\n",a);
return 0;
}