printf函数返回值


//返回值:正确返回输出的字符总数,错误返回负值,与此同时,输入输出流错误标志将被置值,可由指示器ferror来检查输入输出流的错误标志。
#include <stdio.h>
#define renum "welcome to ms"
main()
{
    int a;
    const char *ah="hello world";
    a=printf("%s\n",renum);
    printf("printf函数返回值是:%d\n",a);
    a=printf("%s",ah);
    printf("printf函数返回值是:%d",a);
    getchar();
}

 

 

 

posted @ 2021-03-08 18:49  myrj  阅读(434)  评论(0编辑  收藏  举报