#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
int main(){
char str [1000] = "";
char ch = 'M';
char *findM;
printf("Enter a line of text\n");
scanf("%s", str);
findM = strchr(str, ch);
printf("string after %c is %s ", ch, findM);
return 0;
}
程序的输入是"My name is Steve"
,而这个程序的输出变成, M 之后的字符串是 (null) 为什么会出现这种情况?