题目内容 (请给出正确答案)
[主观题]

阅读程序: main() { char strl[]="how do you do",str2[10]; char * p1=strl,* p2=

阅读程序: main() { char strl[]="how do you do",str2[10]; char * p1=strl,* p2=str2; scanf("%s”,p2); printf("%s”,p2); printf("%s\n",p1); } 运行上面的程序,输入字符串HOW DO YOU DO 则程序的输出结果是【 】。

提问人:网友xinlingood 发布时间:2022-01-06
参考答案
查看官方参考答案
如搜索结果不匹配,请 联系老师 获取答案
更多“阅读程序: main() { char strl[]="ho…”相关的问题
第1题
阅读程序,给出程序的执行结果。 #include <stdio.h> main() { char c1 = ‘a’, c2 = ‘b’ , c3 = ‘c’; printf(“a%cb%cc%c\n”, c1, c2, c3); }
点击查看答案
第2题
阅读程序,指出输出结果是()。 void main() { char c1,c2,c3; c1='a'; c2='z'; c3=c2-c1; printf("%c,%c,%d ",c1,c2,c3); }

A.a ,z ,25

B.A,Z,25

C.a,z,\

D.97,122,25

点击查看答案
第3题
阅读程序: include<string.h> include<strdio.h> strle(char a[],char b[]) {

阅读程序: include<string.h> include<strdio.h> strle(char a[],char b[]) {int num=0,n=0; while(*(a+num)!=0)num+ +; while(b[n]) { * (a+num)=b[n];num+ +;n+ +;} return(num); } main() {char strl[81],str2[81],* p1=strl,*p2=str2; gets(p1);gets(p2); prinf("%d\n",strle(p1,p2)); } 运行上面的程序,如果从键盘上输入字符串qwerty和字符串abcd,则程序的输出结果是【 】。

点击查看答案
第4题
阅读程序,分析程序实现的功能(设系统晶振为12MHz)。 #include <reg51.h> unsigned char i;

4. 阅读程序,分析程序实现的功能(设系统晶振为12MHz)。 #include <reg51.h> unsigned char i; sbit P1_1=P1^1; void main() { i=0; TMOD=0x10; TH1=(65536-10000)/256; TL1=(65536-10000)%256; EA=1; ET1=1; TR1=1; while(1); } void timer1_int(void) interrupt 3 { TH1=(65536-10000)/256; TL1=(65536-10000)%256; i++; if(i==2) P1_1=0; else if(i==3) { i=0; P1_1=1; } }

点击查看答案
第5题
阅读程序填空。以下程序用于实现字符串链接,请在程序空白处将程序补充完整。 #include <stdio.h
> void MyStrcpy(char *p, char *q); main() { char a[80], b[80]; printf("Please enter a:"); gets(a); printf("Please enter b:"); gets(b); MyStrcpy(alb); printf("连接后的新字符串:"); puts(a); } void MyStrcpy(char *p, char *q) { while(*p!=’\0’) { p++; } for(;*q!=’\0’;p++,q++) { *p=*q; } (); }

点击查看答案
第6题
阅读程序,并按给定的输出格式将程序运行结果写在“运行结果:”之后 #include <stdio.h> void main() { char c1, c2; int n1, n2; c1 = getchar(); c2 = getchar(); n1= c1 - ’0’; n2 = n1*10 + (c2 - ’0’); printf ("%d\n", n2); } 若输入48,则运行结果是:

A.24

B.48

C.84

D.28

点击查看答案
第7题
结合硬件连接图,阅读程序,分析其功能。 [图] #include&...

结合硬件连接图,阅读程序,分析其功能。结合硬件连接图,阅读程序,分析其功能。 [图] #include&...结合硬件连接图,阅读程序,分#include<reg51.h> sbit AddA = P2^0 sbit AddB = P2^1 sbit AddC = P2^2 sbit AdSta = P2^3 sbit AdOE = P2^4 sbit AdEOC = P3^2 sbit DAXFER = P2^5 void main() { unsigned char i; unsigned char temp=0,max=0; while(1) { for(i = 0; i < 8; i ++) { P2 = i; ADSta = 1; _nop_();_nop_(); ADSta = 0; while(!ADEOC == 1); while(!ADEOC == 0); ADOE = 1; temp = P0; ADOE = 0; if(temp > max) max = temp; } P0 = max; DASta = 0; _nop_(); DASta = 1; } }

点击查看答案
第8题
阅读程序。阅读下列C++程序。阅读后请说明程序的功能,并对每条语句进行注释,说明其作用。 #include
<iostream> using namespace std; int fun(char str[ ]) { int n = 0, num = 0; while (str[n] != ‘\0’) { if (str[n] >= ‘A’ && str[n] <= ‘z’ || str[n]>= ‘a’ && str[n] <= ‘z’) num++; n++; } return num; int main() { cout fun(“123 abc abc” endl; 0;>

点击查看答案
第9题
阅读程序。阅读下列C++程序。阅读后请说明程序的功能,并对每条语句进行注释,说明其作用。添加注释并
提交源程序(请粘贴源代码或屏幕截图,不要上传附件)。 #include <iostream> using namespace std; int fun(char str[ ]) { int n = 0, num = 0; while (str[n] != ‘\0’) { if (str[n] >= ‘A’ && str[n] <= ‘z’ || str[n]>= ‘a’ && str[n] <= ‘z’) num++; n++; } return num; int main() { cout fun(“123 abc abc” endl; 0;>

点击查看答案
第10题
阅读程序。阅读下列C++程序(共2个文件)。阅读后请说明程...

阅读程序。阅读下列C++程序(共2个文件)。阅读后请说明程序的功能,并对每条语句进行注释,说明其作用。添加注释并提交源程序(请粘贴源代码或屏幕截图,不要上传附件)。 // 程序文件:1.cpp #include <iostream> using namespace std; void fun(int x) { if (x < 0) { cout << ‘-‘; x = -x; } while (x != 0) { cout << x%10; x /= 10; } cout << endl; } void fun(char *str) { int N = 0; while (str[N] != ‘\0’) N++; for (int n = N-1; n >= 0; n--) cout << str[n]; cout << endl; } // 程序文件:2.cpp #include <iostream> using namespace std; extern void fun(int x); extern void fun(char *str); int main() { fun(-2015 ); fun(“-2015” ); return 0; }

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

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

简答题官方微信公众号

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

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

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