c000010401c语言中 是什么意思思

共有 26405 人关注过本帖
标题:C语言中%*s,%*c 是什么意思
等 级:业余侠客
帖 子:240
专家分:226
结帖率:97.44%
&&已结贴√
&&问题点数:20&&回复次数:15&&&
C语言中%*s,%*c 是什么意思
搜索更多相关主题的帖子:
来 自:云南
等 级:论坛游民
帖 子:27
专家分:78
回复 楼主 世界模型
额我只知道%s是以字符串,%c是以当个字符!
来 自:内蒙古包头
等 级:贵宾
威 望:19
帖 子:3082
专家分:11056
我貌似没见过%*s 和 %*c
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
===========深入&-----------------&浅出============
等 级:业余侠客
帖 子:240
专家分:226
我只知道%*c在输入的时候有吃掉回车符的作用
前面的就不知道了
等 级:蜘蛛侠
帖 子:621
专家分:1069
这个的作用就是使该输出格式无效 不会按照这个格式输出的意思
来 自:邯郸
等 级:火箭侠
帖 子:1250
专家分:3538
动态控制显示格式用的,运行下下面的代码就明白了:
程序代码:#include &stdio.h&
int main(int argc, char* argv[]) {
&&& int minimum_
&&& for (minimum_length = <font color=#; minimum_length & <font color=#; minimum_length++) {
&&&&&&&&printf(&Minimum length %d:\n&, minimum_length);
&&&&&&&&printf(&%*c\n%*s\n\n&, minimum_length, 'A', minimum_length, &ABC&);&&& // * 用来表示一个整数值
&&& return <font color=#;
来 自:北京
等 级:贵宾
威 望:94
帖 子:6779
专家分:16751
大家见过:
这样的修饰吧?
但那个 5 得写死在程序里。如果想,用变量控制呢?方法就是这个,比如:
程序代码:
int a = <font color=#;
int b = <font color=#;
printf(&%*d&, b, a);
效果和 %5d 一样。
等 级:新手上路
吃掉回车,其余不懂---
等 级:蜘蛛侠
帖 子:486
专家分:1185
%*5s是为了将后面的5个字符读入而不对任何字符串赋值,同理可得%*c,%*d,%*f,正则。。还是不说了
免费赠送河蟹一只
来 自:北京
等 级:贵宾
威 望:94
帖 子:6779
专家分:16751
哦。楼主没说清楚。这个东西用在 scanf 和 printf 里效果是不一样的。
其实感觉也不是很常用。
在 scanf 里的意思,表示忽略要读的项。比如 %*d 就是读一个 %d 该读的东西,但不赋值给任何变量。
scanf (&%*d %d&, a);
如果你输入的是
那么 a 就是 2。那个 1 就被读掉后忽略了。
版权所有,并保留所有权利。
Powered by , Processed in 0.031965 second(s), 8 queries.
Copyright&, BCCN.NET, All Rights ReservedC是什么意思,词典释义与在线翻译:
英语字母中的第三个字母(小写为c)
罗马数字100
【化】元素碳的符号
库伦的符号
表示“第三”的符号
表示centi-的符号
abbr.(缩略词)
约(尤用于日期前,源自拉丁语 circa)
=cent(s) 分(币)
=century 世纪
adj.(形容词)
提示:各行业词典APP中含有本词条的独家正版内容,在手机上可看到更多释义内容。
c&:&C语 ...
在&&中查看更多...
a degree on the centigrade scale of temperature
the speed at which light the constancy and universality of the speed of light is recognized by defining it to be exactly 299,792,458 meters per second
a vitamin found in fresh fruits (especially citrus fruits) prevents scurvy
one of the four nucleotides used in building DNA; all four nucleotides have a common phosphate group and a sugar (ribose)
a base found in DNA and RNA and der pairs with guanine
an abundant nonmetallic tetravalent element occurring in three allotropic forms: amorphous carbon and
occurs in all organic compounds
a unit of electrical charge equal to the amount of charge transferred by a current of 1 ampere in 1 second
a general-purpose programing language closely associated with the UNIX operating system
(music) the keynote of the scale of C major
the 3rd letter of the Roman alphabet
street names for cocaine
Adjective:
being ten more than ninety
C的用法和样例:
=country a...
=country a...
C的海词问答与网友补充:
C的相关资料:
c&:&西班牙语的 ...
在&&中查看更多...
c&:&尖牙 ...
在&&中查看更多...
c&:&英文第三个 ...
在&&中查看更多...
c&:&意大利语的 ...
在&&中查看更多...
【近义词】
one hundred,...
嗅用麻醉品
摄氏度,摄氏温度,摄氏度...
摄氏温度,百分度...
磷酸脱氧胞苷...
c的相关缩略词,共有416条
细胞(电话;科学)
版权(通常用&#169;)
相关词典网站:的海词问答和网友补充:
相关词典网站:megalomaniac是什么意思,词典释义与在线翻译:
妄自尊大的人
【医】夸大狂患者
患夸大狂的人
adj.(形容词)
妄自尊大的
患夸大狂的
a pathological egotist
megalomaniac的用法和样例:
用作名词 (n.)
The dictator was a megalomaniac.
那独裁者是个夸大狂患者。
megalomaniac的海词问答与网友补充:
megalomaniac的相关资料:
megalomaniac&:&夸大 ...
在&&中查看更多...
【近义词】
妄自尊大的
极权主义的
相关词典网站:

我要回帖

更多关于 a c是什么意思 的文章

 

随机推荐