#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<time.h>
char *my_stract(char *arr, char *s1)
{
char *sb = arr;
while (*arr!='\0')
{
arr++;
}
while (*s1 != '\0'){
*arr = *s1;
arr++;
s1++;
}
*arr = '\0';
printf("%s\n", sb); //10
printf("%d\n", strlen(sb)); //10
return sb;
//return arr[0];
//printf("%d\n", strlen(arr));
}
int main(void)
{
char arr[100] = "hello";
char *s1 = "world";
printf("%d\n", strlen(arr));
printf("%d\n", strlen(s1));
char * dsb = my_stract(arr, s1);
printf("%s\n", arr);
printf("%s\n", dsb);
system("pause");
return 0;
}