当前位置:网站首页>Printf correlation of C
Printf correlation of C
2022-06-11 08:54:00 【Jimmy_ jimi】
When output is 41 Of ascii code ’ )', ‘\41’ For octal 41, Corresponding decimal system 33,33 Of ascii Code for ’ ! '.
printf("%c%c%c\n", 'H', 41, '\41');
// Output is : H)!
stay scanf Function , added ' *' The part of will be ignored ( skip ), That is, the data you enter will not be obtained by the corresponding parameters .
stay printf Function '*' Indicates that the following parameters are used to replace ' *' The location of , So as to achieve the effect of using variables to control the output format .
int a=1,b=2,c=3,d=5;
printf("%*d\n",a,d); // Output is 5; Equate to printf("%1d\n",d);
printf("%*d\n",b,d); // Output is 5; Equate to printf("%2d\n",d);
printf("%*d\n",c,d); // Output is 5; Equate to printf("%3d\n",d);// Proportion of output 3 Column , Insufficient space filling
Control format output
printf("%3.7s",b); // Indicates that the output length is not less than 3 No more than 7 String
边栏推荐
- 欧洲家具EN 597-1 跟EN 597-2两个阻燃标准一样吗?
- PHP solves Chinese display garbled code
- SAP abap 数据类型与数据对象
- MySQL advanced features, you can read more about it and meet the interview
- Classical graph theory, depth first and breadth first, topology, prim and krukal, it's time to review
- 木板ISO 5660-1 热量释放速率摸底测试
- EN 45545-2t10 precautions for smoke density detection by Horizontal method
- Heap can also be regarded as a tree structure. It is specified that the root node must be greater than or less than the left and right child nodes, but the size order of the left and right child nodes
- (一)aac开篇-核心组件原理之Lifecycle、LiveData、ViewModel与源码分析技巧(转载)
- MATLAB R2022a 安装教程
猜你喜欢

Which Apple devices support this system update? See if your old apple device supports the latest system

leetcode - 739. 每日温度

c语言打印心形

TextView文本大小自动适配与TextView边距的去除

经典图论,深度优先和广度优先,拓扑,Prim和Krukal,该来温习啦

Matlab学习9-图像处理之非线性锐化滤波

Screaming Frog Log File Analyser 中文版安装教程

标准化编写知识

马志强:语音识别技术研究进展和应用落地分享丨RTC Dev Meetup

What is concurrent search set? Are you still worried about it? In fact, it is a problem of connected graph, which is not so difficult to understand
随机推荐
深度学习入门之pytorch安装
leveldb简单使用样例
光伏板怎么申请ASTM E108阻燃测试?
Sword finger offer 51 Reverse pair in array
一些学习记录i=
Installation (detailed illustration) and use of SVN
What are the requirements of the drive housing UL 2043?
AS 3744.1标准中提及ISO8191测试,两者测试一样吗?
MySQL advanced features, you can read more about it and meet the interview
完整的ES6面试题
端口占用问题,10000端口
B+超强树,带你知晓MySQL的底层是怎样的结构
SQL basic query
leetcode - 518. Change II
Cron expressions in scheduled tasks
CMVSS TSD No. 302与49 CFR 571.302测试方法是否一样
【Image Processing】空间域图像增强
leetcode - 230. 二叉搜索树中第K小的元素
Oracle learning (I)
Heap can also be regarded as a tree structure. It is specified that the root node must be greater than or less than the left and right child nodes, but the size order of the left and right child nodes