The difference between puts and fputs

Reprinted: 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);

      //Note that the puts() function can only output strings, other types cannot be output

      //In addition: the puts() function will print "\n" after output, and whether you have "\n" or not, you must print a "\n"

      //puts and fputs are compared, but fputs has one more parameter stdout, and it will not print a "\n" after output by default

     //fputs(ok,stdout);

      system("pause");

      return 0;

}

Guess you like

Origin blog.csdn.net/modi000/article/details/114043760