职场就业

当前位置 /首页/职场理财/职场就业/列表

C语言putchar函数如何使用

一个实例介绍C语言putchar函数如何使用

操作方法

(01)先输入预处理命令的文件包含命令。#include <stdio.h>

C语言putchar函数如何使用

(02)定义主函数。int main(){}记得把花括号写全。

C语言putchar函数如何使用 第2张

(03)定义字符变量,并初始化。char a='L', b='O', c='V',d='e';

C语言putchar函数如何使用 第3张

(04)向显示器输出相应的字符。putchar(a);putchar(b);putchar(c);putchar(d);

C语言putchar函数如何使用 第4张

(05)向显示器输出换行符。putchar('n');return 0;

C语言putchar函数如何使用 第5张

(06)点击编译按钮进行程序编译。

C语言putchar函数如何使用 第6张

(07)运行之后结果如下。

C语言putchar函数如何使用 第7张
TAG标签:putchar 函数 语言 #