confused..again [英] confused..again

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

问题描述

我很容易看到我想用这段代码做什么:


#include< stdio.h>


main(){

char name [200];

printf(" Enter - ");

fflush(stdout);

fgets(name,200,stdin);

printf(" is?" name);}


我也尝试过最后一行用printf

printf(是?%c,名字);


无论哪种方式相同的结果。 Printf不会打印名称的值。


比尔

It is very easy to see what I am trying to do with this code:

#include <stdio.h>

main(){
char name[200];
printf ("Enter -");
fflush (stdout);
fgets (name,200,stdin);
printf("is? ",name);}

I have also tried this with the last line with printf

printf("is? %c",name);

Either way same results. Printf will not print the value of name.

Bill

推荐答案

Bill Cunningham写道:
Bill Cunningham wrote:

我很容易看到我想用这段代码做什么:
It is very easy to see what I am trying to do with this code:



I 我觉得这很容易。请不要假设每个人

其他就像你一样敏锐。

I''m not finding it easy. Please don''t assume everyone
else is as perceptive as you are.


#include< stdio.h>


main(){

char name [200];

printf(" Enter - ");

fflush(stdout);

fgets(name,200,stdin);

printf(" is?",name);}


我也用printf的最后一行尝试了这个

printf(" is?%c",name);


无论哪种结果相同。 Printf不会打印名称的值。
#include <stdio.h>

main(){
char name[200];
printf ("Enter -");
fflush (stdout);
fgets (name,200,stdin);
printf("is? ",name);}

I have also tried this with the last line with printf

printf("is? %c",name);

Either way same results. Printf will not print the value of name.



也许你想要


printf(" is?%s",name);


-

Eric Sosman
es **** *@ieee-dot-org.inva


文章< s9Tdj.35028
In article <s9Tdj.35028


NL5.2831 @ trnddc05>,

Bill Cunningham< no **** @ nspam.comwrote:
NL5.2831@trnddc05>,
Bill Cunningham <no****@nspam.comwrote:

很容易看出我的内容我试图用这个代码:
It is very easy to see what I am trying to do with this code:


> #include< stdio.h>
>#include <stdio.h>


> main(){

char name [200];

printf( 输入 - ");

fflush(stdout);

fgets(name,200,stdin);

printf("是?,名称);}
>main(){
char name[200];
printf ("Enter -");
fflush (stdout);
fgets (name,200,stdin);
printf("is? ",name);}


>我还尝试了最后一行printf
>I have also tried this with the last line with printf


> printf(" is?%c",name);
>printf("is? %c",name);


>两种方式都是相同的结果。 Printf不会打印名称的值。
>Either way same results. Printf will not print the value of name.



printf(" is?%s",name);

-

" No一个人有权通过要求经验证据来摧毁另一个人的信念。 - Ann Landers

printf("is? %s", name);
--
"No one has the right to destroy another person''s belief by
demanding empirical evidence." -- Ann Landers


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

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