当前位置:网站首页>Printf function

Printf function

2022-06-13 06:04:00 You must know this and do it yourself

printf() yes C Language standard library functions , Used to output the formatted string to On the screen , The output rule is :

    1、 When a newline character is encountered , Such as :

         printf("test printf function one");

         printf("test printf function tow\n");

          After executing this statement ,“test printf function onetest printf function tow” Instantly on the screen .

     2、 The content displayed exceeds 1024 Byte time , Such as :

           printf(......);

          If “......” The total length of Greater than 1024 bytes , Although there is no line break at this time , The displayed content will also be displayed directly on the screen .

     3、 Yes fflush Function time , The displayed content is immediately displayed on the screen , Such as :

           printf(test printf function);

           fflush(stdout);

     4、 Program execution scan When you need to input characters from a standard input device , Such as :

           printf(test printf function);

                ......

           scan(enter number:%d,&iNum);

           scan Will cause content to be displayed on the screen .

   5、 At the end of the program , Causes the displayed content to be output to the screen .

原网站

版权声明
本文为[You must know this and do it yourself]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202270558177859.html