scanf 与fgets

scanf: 1.以输入字符串也可以输入数字 。 2、遇到空格就停止.3。会有segmentation fault.

fgets: 1、只能输入字符串。2、回车才会停止。3、不会有segmenntation fault

猜你喜欢

转载自www.cnblogs.com/zijidefengge/p/12315329.html
今日推荐