C语言中scanf的操作代码
程序员文章站
2022-05-13 16:13:07
scanf真的是骚呀,在这儿占个坑,记录一下scanf的骚操作
// Declare a variable named 'input_string' to h...
scanf真的是骚呀,在这儿占个坑,记录一下scanf的骚操作
// Declare a variable named 'input_string' to hold our input. char input_string[105]; // Read a full line of input from stdin and save it to our variable, input_string. //%[]==%s,input a string,and '^' means opposite or negative,so '^\n' means getting everything but'\n' scanf("%[^\n]", input_string);
上一篇: Trie树的C++实现