重要提示:请勿将账号共享给其他人使用,违者账号将被封禁!
查看《购买须知》>>>
首页 > 其他> 其他
网友您好,请在下方输入框内输入要搜索的题目:
搜题
拍照、语音搜题,请扫码下载APP
扫一扫 下载APP
题目内容 (请给出正确答案)
[单选题]

下面程序#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. 不确定的值

答案
查看答案
更多“下面程序#include "stdio.h" #include "string.h" main(){char *s1=&quo”相关的问题

第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.程序不正确

点击查看答案
下载APP
关注公众号
TOP
重置密码
账号:
旧密码:
新密码:
确认密码:
确认修改
购买搜题卡查看答案 购买前请仔细阅读《购买须知》
请选择支付方式
  • 微信支付
  • 支付宝支付
点击支付即表示同意并接受了《服务协议》《购买须知》
立即支付 系统将自动为您注册账号
已付款,但不能查看答案,请点这里登录即可>>>
请使用微信扫码支付(元)

订单号:

遇到问题请联系在线客服

请不要关闭本页面,支付完成后请点击【支付完成】按钮
遇到问题请联系在线客服
恭喜您,购买搜题卡成功 系统为您生成的账号密码如下:
重要提示:请勿将账号共享给其他人使用,违者账号将被封禁。
发送账号到微信 保存账号查看答案
怕账号密码记不住?建议关注微信公众号绑定微信,开通微信扫码登录功能
请用微信扫码测试
优题宝