#include <stdio.h>
void s_copy();
char A[21],B[21];
int i;
void main(){
printf("文字列を入力してね (20文字以内)\n";
scanf("%20s",A);
s_copy();
printf(" 入力された文字列 : %s \n",A);
printf("コピーされた文字列 : %s \n",B);
}
void s_copy(){
i=-1;
do{
i++;
B[i]=A[i];
}while (A[i] != 0);
} |