PGM [英] pgm

查看:83
本文介绍了PGM的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请帮助我..........................

以下声明的输出是什么?和为什么

i = 0;

printf("%d%d%d",++ i,i,i ++);

<函数printf中的div class =h2_lin>解决方案

从右到左。

所以我们可以得到输出:2 1 0

< ra ******** @ gmail.com>

??????:11 ***************** *****@o61g2000hsh.google groups.com ...


帮帮我................ ..........

以下声明的输出是什么?以及为什么

i = 0;

printf( %d%d%d,++ i,i,i ++);





rahnap2 ... @ gmail.com写道:


帮帮我吧................. .........

以下声明的输出是什么?以及为什么

i = 0;

printf(" ;%d%d%d",++ I,I,I ++);



未定义,因为i的值被多次修改

序列点之间。

阅读:
http://c-faq.com/expr/seqpoints。 html


xuyao写道:


函数printf从右到右离开。

所以我们可以得到输出:2 1 0

< ra ******** @ gmail.com>

??????:11**********************@o61g2000hsh.google groups.com ...


>帮帮我..........................
以下是什么输出陈述?以及为什么
i = 0;
printf("%d%d%d",++ i,i,i ++);



你完全错了。任何查看常见问题解答或关注

新闻组的人(在发布到任何新闻组之前的两个关键做法)都会知道这两行中没有定义的输出,并且会

知道没有理由期望对

参数进行评估。


但人们期望得到什么?使用Gmail的顶级海报?


help me pls..........................
what is the output of the following statement?and why
i=0;
printf("%d%d%d",++i,i,i++);

解决方案

in the function printf from right to left.
so we can get the output: 2 1 0
<ra********@gmail.com>
??????:11**********************@o61g2000hsh.google groups.com...

help me pls..........................
what is the output of the following statement?and why
i=0;
printf("%d%d%d",++i,i,i++);




rahnap2...@gmail.com wrote:

help me pls..........................
what is the output of the following statement?and why
i=0;
printf("%d%d%d",++i,i,i++);

Its undefined because the value of i is modified more than once
between sequence points.
Read:
http://c-faq.com/expr/seqpoints.html


xuyao wrote:

in the function printf from right to left.
so we can get the output: 2 1 0
<ra********@gmail.com>
??????:11**********************@o61g2000hsh.google groups.com...

>help me pls..........................
what is the output of the following statement?and why
i=0;
printf("%d%d%d",++i,i,i++);

You are simply wrong. Anyone who checked the FAQ or followed the
newsgroup (two crucial practices before posting to any newsgroup) would
know that there is no defined output from those two lines, and would
know that there is no reason to expect right to left evaluation of
arguments.

But what does one expect of a top-poster who uses gmail?


这篇关于PGM的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆