Why does scanf ask twice for input when there's a newline at the end of the format string?

后端 未结 6 934
野的像风
野的像风 2020-11-22 04:52
#include 
#include 
#include 

char *method1(void)
{
    static char a[4];
    scanf(\"%s\\n\", a);
    return a;
}

i         


        
6条回答
提交回复
热议问题