首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
有如下程序 #include<iostream.h> void main() {char ch[2][5]={"6937","8254"},*p[2]; int i,j,s=0; for(i=0;i<2;i++)p[i]=ch
有如下程序 #include<iostream.h> void main() {char ch[2][5]={"6937","8254"},*p[2]; int i,j,s=0; for(i=0;i<2;i++)p[i]=ch
admin
2009-01-15
37
问题
有如下程序 #include<iostream.h> void main() {char ch[2][5]={"6937","8254"},*p[2]; int i,j,s=0; for(i=0;i<2;i++)p
=ch
; for(i=0;i<2;i++) for(j=0;p
[j]>’\0’;j+=2) s=10*s+p
[j]-’0’; cout<<s; return 0; } 该程序的输出结果是( )。
选项
A、69825
B、63825
C、6385
D、693825
答案
4
解析
转载请注明原文地址:https://kaotiyun.com/show/Efkp777K
本试题收录于:
二级C题库NCRE全国计算机二级分类
0
二级C
NCRE全国计算机二级
相关试题推荐
运行下列程序时,若输入数据为“321”,则输出结果是()。main(){intnum,i,j,k,s;scanf(’’%d’’,&num);if(num>99)s=3:elsei
下面关于算法的叙述中,正确的是()。
有以下程序#include<stdio.h>main(){intt;scanf("%d",&t);if(t++<6)printf("%d\n",t);elseprintf("
有以下程序#includetypedefstruct{intb,p;}A;voidf(Ac)/*注意:c是结构变量名*/{intj;c.b+=1;c.p+=2;}main(){i;Aa
若有定义语句:intyear=2009,*p=&year;以下不能使变量year中的值增至2010的语句是
下列选项中不属于面向对象程序设计特征的是
设顺序表的长度为n。下列算法中,最坏情况下比较次数等于n(n-1)/2的是
在数据库设计中,设计E-R图是()的任务。
以下程序用来统计文件中字符的个数(函数feof用以检查文件是否结束,结束时返回非零)#includemain(){FILE*fp;longnum=0;fp=fopen("fname.dat","r");w
以下函数按每行8个输出数组中的数据:voidfun(int*w,intn){inti;for(i=0;i
随机试题
在中国,农历七月初七的夜晚天气温和,草木飘香,这就是人们俗称的七夕节,又叫乞巧节或女儿节,它是中国传统节日中最具浪漫色彩的一个节日。七夕节是一个由爱情神话演绎而来的节日。故事主角天上的织女(theWeavingMaid)与人间的牛郎(theCowhe
羚羊角的正确用法是
患儿2岁,发热、呕吐、烦躁1天。查体:T40℃,嗜睡,前囟隆起,颈强直,心肺(一),克氏征(+),布氏征(+),血象WBC28.0×109/L,目前患儿需做哪项检查能快速诊断
ThestoryofwhyIlearnttoswimisinteresting.Threeyearsbefore,myfatherandIwenttotheswimmingpoolforswim.While
最常见的行政协调方法是()。
Theauthor’sattitudetowardsthephenomenamentionedatthebeginningofthetextisoneofWhichofthefollowingisclosest
Whatdoesthemanwanttoknow?
Linguistshavefoundthatsignlanguagesandspokenlanguagessharemanyfeatures.Likespokenlanguages,whichuseunitsofsou
Ayearago,monetaryunionlookedasifitwasheadingforcertaindeath,withtheEuropeanbankingsysteminapparentmeltdown
RocketRenaissanceTheEarofPrivateSpaceflightIsAbouttoStartBackgroundTwoyearsago,peoplewitnessedthefirstspa
最新回复
(
0
)