C语言中scanf的操作代码
程序员文章站
2022-12-10 20:32:45
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);
上一篇: 浅谈用户体验的可视化
下一篇: 安装docker-compose