/* ================================================
やってみよう1:
姓と名が空白で区切られている文字列が与えられたとき,
名を出力する関数print_name を作ろう.
=================================================== */
#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
void print_name(char* s) {
while (*s != ' ' && *s != '\0') {
s++;
}
if (*s == ' '){
}
}
int main(void) {
char* name = "Okamoto Taro";
print_name(name);
return 0;
}
/*
#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
void print_name(char* s) {
while( *s != ' ' ){
s++;
}
printf("%s", s+1);
}
int main(void) {
char *name = "Okamoto Taro";
printf("こんにちは,");
print_name(name);
printf("さん\n");
return 0;
}
*/
LyogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09CuOChOOBo+OBpuOBv+OCiOOBhu+8ke+8mgrlp5PjgajlkI3jgYznqbrnmb3jgafljLrliIfjgonjgozjgabjgYTjgovmloflrZfliJfjgYzkuI7jgYjjgonjgozjgZ/jgajjgY3vvIwK5ZCN44KS5Ye65Yqb44GZ44KL6Zai5pWwcHJpbnRfbmFtZSDjgpLkvZzjgo3jgYbvvI4gCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSAqLwojZGVmaW5lIF9DUlRfU0VDVVJFX05PX1dBUk5JTkdTCiNpbmNsdWRlIDxzdGRpby5oPgoKdm9pZCBwcmludF9uYW1lKGNoYXIqIHMpIHsKICAgIHdoaWxlICgqcyAhPSAnICcgJiYgKnMgIT0gJ1wwJykgewogICAgICAgIHMrKzsKICAgIH0KICAgIGlmICgqcyA9PSAnICcpewogICAgICAgIHByaW50ZigiJXMiLCBzICsgMSk7Cn0KCgoKIHByaW50ZigiJXMiLCBzICsgMSk7Cn0KCmludCBtYWluKHZvaWQpIHsKIGNoYXIqIG5hbWUgPSAiT2thbW90byBUYXJvIjsKCiBwcmludGYoIuOBk+OCk+OBq+OBoeOBr++8jCIpOwogcHJpbnRfbmFtZShuYW1lKTsKIHByaW50Zigi44GV44KTXG4iKTs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