当前位置:网站首页>Brush questions in C language | output love (14) with putchar
Brush questions in C language | output love (14) with putchar
2022-06-22 09:14:00 【C language train】
example 14:C Language implementation successively outputs Love Four characters .
Their thinking : Definition 4 A character variable , Assign initial values respectively L、o、v、e’, And then use putchar Output function 4 The value of a character variable .
Source code demo :
#include<stdio.h>
int main()
{
char character1,character2,character3,character4;// Defining character variables
character1='L';// Initialize variable , The character L Assign a value to character1
character2='o';// Initialize variable , The character o Assign a value to character2
character3='v';// Initialize variable , The character v Assign a value to character3
character4='e';// Initialize variable , The character e Assign a value to character3
putchar(character1);// The output characters L
putchar(character2);// The output characters o
putchar(character3);// The output characters v
putchar(character4);// The output characters e
putchar('\n');// Line break
return 0;// The return value of the function is 0
}Compilation result :
Love
--------------------------------
Process exited after 0.06673 seconds with return value 0
Please press any key to continue . . .In the above code, you can see : use putchar Function can output characters that can be displayed on the display screen , You can also output screen control characters , Such as putchar('\n') Is used to output a newline character , Moves the current position of the output to the beginning of the next line .
边栏推荐
- 看看volatile你深知多少
- C语言刷题 | 三目运算实现判断大写(16)
- Solidity from introduction to practice (III)
- Machine learning | nltk_ Data download error |nltk's stopwords corpus download error solution
- pip3 install xxx报错:Command 'lsb_release -a' returned non-zero exit status 1.
- 【node】理论+实践让你拿下session、cookie
- 机器学习|nltk_Data下载错误|nltk的stopwords语料下载错误解决方法
- Byte/byte?别搞晕了!
- [target detection] | detection error mechanism why object detectors fail: investigating the influence of the dataset
- 循环队列超详细实现,小白秒懂
猜你喜欢

Byte/byte?别搞晕了!

DOM编程
![[target detection] | detection error mechanism why object detectors fail: investigating the influence of the dataset](/img/d2/101c8ef5dac517718bbe44ee4fd607.png)
[target detection] | detection error mechanism why object detectors fail: investigating the influence of the dataset
![[network security officer] an attack technology that needs to be understood - high hidden and high persistent threats](/img/c9/c0ee95e816cac698f5397cc369d9ec.jpg)
[network security officer] an attack technology that needs to be understood - high hidden and high persistent threats

Detailed explanation and Simulation of string and memory operation functions

让你轻松上手【uni-app】

How C processes use non static methods

MySQL中常用的SQL语句

【node】快收下爬虫,我们不再为数据发愁

Threejs implementation of simple panoramic view demo
随机推荐
General ASP reads CSV files and displays all rows and columns as tables
Solid from entry to practice (end)
函数总结(1)
PHP output color image with specified height and width for web page background image
Detailed explanation and Simulation of string and memory operation functions
让你轻松上手【uni-app】
[Architect (Part 39)] connecting MySQL database developed by server
Sparse array ^ create ^ restore ^ save ^ fetch -- family bucket
Continuous training on tensorflow breakpoint (principle + code explanation)
C语言刷题 | 输入一个数输出对应的值(13)
C语言刷题 | 判断某年是否只闰年(15)
The U.S. Department of justice established a national crypto enforcement team to combat illegal acts in related fields
Final典型案例
container_of
IS_ERR()
Node cannot recognize the 'node' entry as the name of a cmdlet, function, script file, or runnable program. Please check the spelling of the name. If the path is included, make sure the path is correc
文件小能手---multer
两个线程各执行100次i++,得到的可能值
Two threads execute i++ 100 times respectively, and the possible values obtained
变量那些事