/*
C/C++の宿題片付けます 161代目
http://t...content-available-to-author-only...h.net/test/read.cgi/tech/1354070278/
125 名前:デフォルトの名無しさん [sage]: 2012/12/06(木) 10:12:21.78
[1] 授業単元:c言語 関数&配列
[2] 問題文 関数配列の問題です。
http://www.dotup.org/uploda/www.dotup.org3703015.pdf
[3] 環境
[3.1] OS: Linux
[3.2] コンパイラ名とバージョン: gcc
[3.3] 言語: C
[4] 期限:12/11
ポインターは使わずによろしくお願いいたします
5. 文字列str1[],str2[]を引数とし、str2[]の文字列をstr1[]に上書きする関数mystrcpy()(返り値なし)を
作成し、動作を確認せよ。
ここで、配列str1[]のサイズはstr2[]の文字列の長さ+1以上としてもよい。
*/
#include<stdio.h>
#include<string.h>
void mystrcpy(char s1[], char s2[])
{
}
int main(int argc, char *argv[])
{
char str1[] = "1234567890";
char str2[] = "moimoi";
printf("str1[] = %s\n", str1
); printf("str2[] = %s\n", str2
); mystrcpy(str1, str2);
printf(" # mystrcpy(str1, str2);実行\nstr1[] = %s\n", str1
); return 0;
}
LyoKICAgIEMvQysr44Gu5a6/6aGM54mH5LuY44GR44G+44GZIDE2MeS7o+ebrgogICAgaHR0cDovL3QuLi5jb250ZW50LWF2YWlsYWJsZS10by1hdXRob3Itb25seS4uLmgubmV0L3Rlc3QvcmVhZC5jZ2kvdGVjaC8xMzU0MDcwMjc4LwogICAgICAgIDEyNSDlkI3liY3vvJrjg4fjg5Xjgqnjg6vjg4jjga7lkI3nhKHjgZfjgZXjgpMgW3NhZ2Vd77yaIDIwMTIvMTIvMDYo5pyoKSAxMDoxMjoyMS43OCAgCiAgICAgICAgWzFdIOaOiOalreWNmOWFg++8mmPoqIDoqp4g6Zai5pWw77yG6YWN5YiXCiAgICAgICAgWzJdIOWVj+mhjOaWh+OAgOmWouaVsOmFjeWIl+OBruWVj+mhjOOBp+OBmeOAggogICAgICAgIO+9iO+9lO+9lO+9kO+8mi8vd3d3LmRvdHVwLm9yZy91cGxvZGEvd3d3LmRvdHVwLm9yZzM3MDMwMTUucGRmCiAgICAgICAgWzNdIOeSsOWigyAKICAgICAgICDjgIBbMy4xXSBPU++8miBMaW51eCAKICAgICAgICDjgIBbMy4yXSDjgrPjg7Pjg5HjgqTjg6nlkI3jgajjg5Djg7zjgrjjg6fjg7PvvJogZ2NjIAogICAgICAgIOOAgFszLjNdIOiogOiqnu+8miBDIAogICAgICAgIFs0XSDmnJ/pmZA6MTIvMTEgCiAgICAgICAg44Od44Kk44Oz44K/44O844Gv5L2/44KP44Ga44Gr44KI44KN44GX44GP44GK6aGY44GE44GE44Gf44GX44G+44GZIAogICAgNS4g5paH5a2X5YiXc3RyMVtdLHN0cjJbXeOCkuW8leaVsOOBqOOBl+OAgXN0cjJbXeOBruaWh+Wtl+WIl+OCknN0cjFbXeOBq+S4iuabuOOBjeOBmeOCi+mWouaVsG15c3RyY3B5KCko6L+U44KK5YCk44Gq44GXKeOCkgogICAgICAg5L2c5oiQ44GX44CB5YuV5L2c44KS56K66KqN44Gb44KI44CCCiAgICAgICDjgZPjgZPjgafjgIHphY3liJdzdHIxW13jga7jgrXjgqTjgrrjga9zdHIyW13jga7mloflrZfliJfjga7plbfjgZUrMeS7peS4iuOBqOOBl+OBpuOCguOCiOOBhOOAggoqLwojaW5jbHVkZTxzdGRpby5oPgojaW5jbHVkZTxzdHJpbmcuaD4KCnZvaWQgbXlzdHJjcHkoY2hhciBzMVtdLCBjaGFyIHMyW10pCnsKICAgIHN0cmNweShzMSwgczIpOwp9CgppbnQgbWFpbihpbnQgYXJnYywgY2hhciAqYXJndltdKQp7CiAgICBjaGFyIHN0cjFbXSA9ICIxMjM0NTY3ODkwIjsKICAgIGNoYXIgc3RyMltdID0gIm1vaW1vaSI7CgogICAgcHJpbnRmKCJzdHIxW10gPSAlc1xuIiwgc3RyMSk7CiAgICBwcmludGYoInN0cjJbXSA9ICVzXG4iLCBzdHIyKTsKICAgIG15c3RyY3B5KHN0cjEsIHN0cjIpOwogICAgcHJpbnRmKCIgIyAgbXlzdHJjcHkoc3RyMSwgc3RyMik75a6f6KGMXG5zdHIxW10gPSAlc1xuIiwgc3RyMSk7CiAgICByZXR1cm4gMDsKfQ==