题目内容 (请给出正确答案)
[单选题]

如下程序段#include <stdio.h>#include <ctype.h>#include <conio.h>int fun (char *str){ int i,j=0; for(i=0;str[i]!= ’\0’;i++) if(str[i]!= ’ ’)str[j++]=str[i]; str[j]= ’\0’;}main(){ char str[81]; int n; clrscr(); printf("Input a string : "); gets(str); fun(str); printf("%s\n",str);}当运行程序时,输入asd af aa z67<回车>,则输出是

A.asdafaaz67

B.asd af aa z67

C.asd

D.z67

提问人:网友guojingsmart 发布时间:2022-01-07
参考答案
查看官方参考答案
如搜索结果不匹配,请 联系老师 获取答案
网友答案
查看全部
  • · 有5位网友选择 D,占比55.56%
  • · 有2位网友选择 C,占比22.22%
  • · 有1位网友选择 B,占比11.11%
  • · 有1位网友选择 A,占比11.11%
匿名网友 选择了C
[5.***.***.124] 1天前
匿名网友 选择了D
[106.***.***.192] 1天前
匿名网友 选择了D
[39.***.***.39] 1天前
匿名网友 选择了D
[154.***.***.106] 1天前
匿名网友 选择了D
[184.***.***.75] 1天前
匿名网友 选择了D
[4.***.***.118] 1天前
匿名网友 选择了A
[137.***.***.126] 1天前
匿名网友 选择了C
[50.***.***.32] 1天前
匿名网友 选择了B
[221.***.***.55] 1天前
加载更多
提交我的答案
登录提交答案,可赢取奖励机会。
更多“如下程序段#include <stdio.h>#includ…”相关的问题
第1题
下面程序的运行结果为( )   #include   class A   {   static int n;   public:   A(){n=1;}   A(int num){n=num;}   void print(){cout< <n;   }   int a::n="2:"   void main()   {   a a,b(3);   a.print();   b.pint();> A、11

B、13

C、23

D、33

点击查看答案
第2题
分析下面程序的运行结果()。 #include "stdio.h" #include "string.h" main() { printf("%d\n",strlen("IBM\n012\\")); }
点击查看答案
第3题
下列程序的执行结果是( )。 class A { public: A(){cout<<"a";} }; b:public a { public: }; int main() b b; return 0; }>
点击查看答案
第4题
有以下程序 #include<iostream> using namespace std; class sample { private: int x; public: sample(int a) { x=a; } friend double square(sample s); }; double square(sample S) { return s.x*s.x; } int main() { sample s1(20),s2(30); cout<<square(s2)<<endl; return 0; } 执行结果是

A.20

B.30

C.900

D.400

点击查看答案
第5题
下面程序的运行结果是 。 #include <iostream> using namespace std; void main( ) { char *p[]={ “BOOL”, “OPK”, “H”, “SP”}; int i; for (i=3; i>=0; i--, i--) cout<<*p[i];>
点击查看答案
第6题
下面程序的运行结果是()。 #include<iostream> using namespace std; class A { int a; public: A(){a=0;1 A(int aa ) {a=aa;} virtual void show() { cout<<a>>"";} }; class B:public A int b: public: B(){b=0:} B(int bb) {b=bb;} void show() {cout<<b>>" ";} }; class C:public B { int c; public: C(int cc) { c=cc;} void show() {cout<<c>>endl;} }; void main() { A a(8 ),*p;B b(9 );C c(10 ); p=&a; p->show(); p=&b; p->show(); p=&c; p->show(); }

A.8 8 8

B.8 9 10

C.0 0 10

D.10 10 10

点击查看答案
第7题
下列程序输出结果是()。 #include main { char a[]={a,b,C,d,e,f,\0). int i,j; i=sizeof(a); j=strlen(a); printf("%d,%d",i,j); }

A.7,7

B.7,6

C.6,6

D.6,7

点击查看答案
账号:
你好,尊敬的用户
复制账号
发送账号至手机
获取验证码
发送
温馨提示
该问题答案仅针对搜题卡用户开放,请点击购买搜题卡。
马上购买搜题卡
我已购买搜题卡, 登录账号 继续查看答案
重置密码
确认修改
欢迎分享答案

为鼓励登录用户提交答案,简答题每个月将会抽取一批参与作答的用户给予奖励,具体奖励活动请关注官方微信公众号:简答题

简答题官方微信公众号

警告:系统检测到您的账号存在安全风险

为了保护您的账号安全,请在“简答题”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!

微信搜一搜
简答题
点击打开微信
警告:系统检测到您的账号存在安全风险
抱歉,您的账号因涉嫌违反简答题购买须知被冻结。您可在“简答题”微信公众号中的“官网服务”-“账号解封申请”申请解封,或联系客服
微信搜一搜
简答题
点击打开微信