C with classes

This commit is contained in:
e2hang
2025-12-31 00:39:23 +08:00
commit a047893756
198 changed files with 11173 additions and 0 deletions

View File

@@ -0,0 +1,40 @@
#include <stdio.h>
#include <stdlib.h>
char str[201];
/*char * add(char *str1,char *str2){
int i=0;
while(*str1!='\0'){
str[i]=*str1;
i++;str1++;
}
while(*str2!='\0'){
str[i]=*str2;
i++;str2++;
}
str[i]='\0';
//printf("%s\n",str);
//return str;
}*/
void add(char *str1,char *str2){
int i=0;
while(*str1!='\0'){
str[i]=*str1;
i++;str1++;
}
while(*str2!='\0'){
str[i]=*str2;
i++;str2++;
}
str[i]='\0';
//printf("%s\n",str);
//return str;
}
int main(){
char a[100],b[100];
//char * p= (char *)malloc(201*sizeof(char));
scanf("%s%s",a,b);
add(a,b);
printf("%s",str);
//free(p);
return 0;
}