-sharpinclude <stdio.h>
void f(void){
char a[8];
char b[8];
scanf("%s",a);
scanf("%s",b);
printf("%s-sharp-sharp%s-sharp-sharp\n",a,b);
}
int main(void){
f();
return 0;
}
As for the beginner c language
code, I defined two character arrays of length 8. But why can I still output normally when I enter characters longer than 8?
for example, when I type "123123123 123123123", pirntf comes out with "123123123-sharp-sharp123123123-sharp-sharp", and the specified number of digits has no effect.
ask seniors for advice.