#include<stdio.h>
int main() {
char s1[6];
scanf_s("%s\n", s1);
printf("%s,%c\n", s1, s1[2]); //array,r
return 0;
}
为什么会出现这个问题呢
#include<stdio.h>
int main() {
char s1[6];
scanf_s("%s\n", s1);
printf("%s,%c\n", s1, s1[2]); //array,r
return 0;
}