//prntval.c--发现printf()函数的返回值
#include<stdio.h>
int main(void)
{
int bph2o = 212;
int rv;
rv = printf ("%d F is water's boiling point.\n",bph2o);
printf("The printf() function printed %d characters.\n",rv);
return 0;
}
212 F is water’s boiling point.
The printf() function printed 32 characters.
//longstrg.c--打印较长的字符串
#include<stdio.h>
int main(void)
{
printf("Here's one way to print a ");
printf("long atring.\n");
printf("Here's another way to print a \
long string.\n");
printf("Here's the newest way to print a ""long string.\n"); //ANSI C
return 0;
}
Here’s one way to print a long atring.
Here’s another way to print a long string.
Here’s the newest way to print a long string.