puts与fputs的区别

转载:https://blog.csdn.net/weixin_41998122/article/details/82221547

#include<stdio.h>

#include<stdlib.h>

int main()

{

      char ok[100] = "just a game";

      puts(ok);

      //注意puts()函数只能输出字符串,其他类型的不能输出

      //另外:puts()函数会在输出之后打印"\n",并且是不管你有没有"\n"都要打印一个"\n"

      //puts和fputs比较,只不过fputs多了一个参数stdout,并且它不会默认在输出之后打印一个"\n"

     //fputs(ok,stdout);

      system("pause");

      return 0;

}

猜你喜欢

转载自blog.csdn.net/modi000/article/details/114043760
今日推荐