首页 > 其他> 其他
题目内容 (请给出正确答案)
[单选题]

下面程序#include "stdio.h" #include "string.h" main(){char *s1="AbDeG";char *s2="AbdEg";s1+=2; s2+=2;printf"%d\n",strcmp(s1,s2));}的运行结果是()

A.正数

B. 负数

C. 零

D. 不确定的值

查看答案
答案
收藏
如果结果不匹配,请 联系老师 获取答案
您可能会需要:
您的账号:,可能还需要:
您的账号:
发送账号密码至手机
发送
安装优题宝APP,拍照搜题省时又省心!
更多“下面程序#include "stdio.h" #includ…”相关的问题
第1题
下面程序由两个源程序文件:t4.h和t4.c组成,程序编译运行的结果是:【 】。 t4.h 的源程序为: d
efine N 10 denne f2(x) (x*N) t4.c 的源程序为: include <stdio. h> define M 8 define f(x) ((x)*M) include "t4.h" main() { int i, j; i=f(1+1); j=f2(1+1); printf(%d%d\n",i, j); }

点击查看答案
第2题
下面程序的功能:将字符数组a中下标值为偶数的元素从小到大排列,其他元素不变。请填空。 inclu
de<stdio. h> include<string. h> main() { char a[]="clanquage", t; int i, j, k; k=strlen(A) ; for(i=0; i<=k-2; i+=2) for(j=i+2;j<k; j+=2) if(【 】) { t=a[i]; a[i]=a[j]; a[j]=t; } puts(A) ; printf("\n"); }

点击查看答案
第3题
以下程序用来统计文件中字符个数。请填空。 include "stdio. h" main() { FILE *fp;long

以下程序用来统计文件中字符个数。请填空。 include "stdio. h" main() { FILE *fp;long num=OL; if((fp=fopen("fname.dat","r")==NULL) { Pirntf("Open error\n"); exit(0);} while(【 】) { fgetc(fp);num++; } printf("num=%1d\n",num-1); fclose(fp); }

点击查看答案
第4题
以下程序的功能是将字符串s中的数字字符放人d数组中,最后输出d中的字符串。例如,输入字符串abc123
edf456gh,执行程序后输出123456。请填空。 include<stdio. h> include<ctype. h> main() { char s[80], d[80]; int i, j; gets(s); for(i=j=0; s[i]!=\0; i++) if(【 】){ d[j]=s[i]; j++;) d[j]=\0; puts(D) ; }

点击查看答案
第5题
以下程序通过函数SunFun()调用F(x),x的值从0到10,这里F(x)=x2+1,由F函数实现,请填空。 inc

以下程序通过函数SunFun()调用F(x),x的值从0到10,这里F(x)=x2+1,由F函数实现,请填空。 include <stdio. h> int SunFun(int); int F(int); main () { pfintf("The sum = % d \n" ,SunFun(10) ); } SunFun(int n) { int x,s =0; for(x=0; x<=n; x++) s+ =F(【 】); return s; F(int x) { return (【 】);}

点击查看答案
第6题
下面程序的输出结果是______。 #include"stdio.h" main() (cbar b[]="ABCD"; char

下面程序的输出结果是______。

#include"stdio.h"

main()

(cbar b[]="ABCD";

char*chp;

for(chp=b;*chp;chp+=2)

printf("%s\t",chp);

printf("\n");

}

点击查看答案
第7题
下面程序的运行结果为() #include class A {

A.1234

B. 1324

C. 1342

D. 3142

点击查看答案
第8题
下面程序的输出结果是()。 include <stdi0.h> include<string.h> main()

下面程序的输出结果是()。 include <stdi0.h> include<string.h> main() {char*pl=“abc”,str[50]=“xyz”; strcpy(Str+2,p1); printf(“%S\n”,Str); }

A.xyzabcABC

B.zabcABC

C.xyabc

D.yzabcABC

点击查看答案
第9题
下面程序的运行结果是()。 include<stdio.h> define_MYDEBUG void main() { ifdef

下面程序的运行结果是()。 include<stdio.h> define_MYDEBUG void main() { ifdef_MYDEBUG printf("DEBUG"); else printf("RELEASE"); endif )

A.DEBUG

B.RELEASE

C.DEBUGRELEASE

D.程序有错误

点击查看答案
第10题
下面程序的输出结果是【 】。 include<stdio.h> main() { static char a[]=" language

下面程序的输出结果是【 】。 include<stdio.h> main() { static char a[]=" language" ,b[]=" program"; char *ptr1=a, *ptr2=b; int k; for(k=0;k<7;k++) if(*(ptr1+k)==*(ptr2+k)) printf(" %c",*(ptr1+k)); }

点击查看答案
第11题
下面程序的运行结果()。 include<stdio.h> void main() { ifdef MYDEBUG int a=90;

下面程序的运行结果()。 include<stdio.h> void main() { ifdef MYDEBUG int a=90; printf("a=%d\n",a); else a+=10; printf("a=%d\n",a); endif )

A.a=90

B.a=100

C.a=190

D.程序不正确

点击查看答案
退出 登录/注册
发送账号至手机
密码将被重置
获取验证码
发送
温馨提示
该问题答案仅针对搜题卡用户开放,请点击购买搜题卡。
马上购买搜题卡
我已购买搜题卡, 登录账号 继续查看答案
重置密码
确认修改