2020.3.2

//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.

2020.3.22020.3.2 hemow 发布了3 篇原创文章 · 获赞 0 · 访问量 38 私信 关注
上一篇:爬楼梯(Python and C++解法)


下一篇:LeetCode 1055. Shortest Way to Form String