#include <stdio.h>
char * my_strcat( char * str_a, char * str_b) ;
char * my_strcat( char * str_a, char * str_b)
{
/*まずaの'\0'を見つける*/
while ( * str_a) {
str_a++;
}
/*aの'\0'の位置へbをコピー*/
while ( * str_b) {
* str_a = * str_b;
str_b++;
str_a++;
}
* str_a = '\0 ' ;
return str_a;
}
int main( void ) {
char a[ 800 ] ;
char b[ 800 ] ;
my_strcat( a, b) ;
return 0 ;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CmNoYXIgKm15X3N0cmNhdChjaGFyICpzdHJfYSwgY2hhciAqc3RyX2IpOwoKY2hhciAqbXlfc3RyY2F0KGNoYXIgKnN0cl9hLCBjaGFyICpzdHJfYikKewoKICAgIC8q44G+44GaYeOBridcMCfjgpLopovjgaTjgZHjgosqLwogICAgd2hpbGUoKnN0cl9hKXsKICAgICAgICBzdHJfYSsrOwogICAgfQoKICAgIC8qYeOBridcMCfjga7kvY3nva7jgbhi44KS44Kz44OU44O8Ki8KICAgIHdoaWxlKCpzdHJfYil7CiAgICAgICAgKnN0cl9hID0gKnN0cl9iOwogICAgICAgIHN0cl9iKys7CiAgICAgICAgc3RyX2ErKzsKICAgIH0KICAgICpzdHJfYSA9ICdcMCc7CiAgICByZXR1cm4gc3RyX2E7Cn0KCgppbnQgbWFpbih2b2lkKXsKICAgIGNoYXIgYVs4MDBdOwogICAgY2hhciBiWzgwMF07CgoJcHJpbnRmKCLmloflrZfjgpLlhaXliptcbmE6Iik7CglzY2FuZigiJXMiLGEpOwoJcHJpbnRmKCJcbmI6Iik7CglzY2FuZigiJXMiLGIpOwoKCiAgICBwcmludGYoIlxuYTolc1x0IiwgYSk7CiAgICBwcmludGYoImI6JXNcbiIsIGIpOwogICAgbXlfc3RyY2F0KGEsIGIpOwogICAgcHJpbnRmKCLntZDmnpxcbiVzIiwgYSk7CgoJcmV0dXJuIDA7Cn0=
compilation info
prog.c: In function ‘main’:
prog.c:28:2: warning: implicit declaration of function ‘scanf_s’ [-Wimplicit-function-declaration]
scanf_s("%s",a);
^
/home/Xey1wS/cc4xVzXU.o: In function `main':
prog.c:(.text.startup+0x31): undefined reference to `scanf_s'
prog.c:(.text.startup+0x4d): undefined reference to `scanf_s'
collect2: error: ld returned 1 exit status
stdout