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

‏有以下程序‏#include‏void main()‏{int a,b,c=290;‏ a=(c/100)%9;‏ b=(-1)&&(-1);printf("%d,%d/n",a,b);}‏输出结果是()。

A.2,-1

B.3,1

C.2,0

D.2,1

查看答案
答案
收藏
如果结果不匹配,请 联系老师 获取答案
您可能会需要:
您的账号:,可能还需要:
您的账号:
发送账号密码至手机
发送
安装优题宝APP,拍照搜题省时又省心!
更多“‏有以下程序‏#include‏void main( )‏{…”相关的问题
第1题
‏有以下程序‏#include‏void main()‏{int i,s=0;for(i=1;i<10;i+=2)‎s+=i+1;‎printf("%d/n",s);}‏程序运行后的输出结果是()。

A.数1~10的累加和

B.数1~9的累加和

C.数1~9中的奇数之和

D.数1~10中的偶数之和

点击查看答案
第2题
下面程序的运行结果是()。 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.程序有错误

点击查看答案
第3题
执行以下的C程序并用运行时环境解释其输出。 include<stdio.h> void g(void)

执行以下的C程序并用运行时环境解释其输出。 include<stdio.h> void g(void) { {int x; printf("%d\n",x); x:3;} {int y; printf("%d\n",y);) } int*f(void) { int x; printf("%d\n",x); return &x; } void main() { int*p; p=f(); *p=1; f(); g(); }

点击查看答案
第4题
以下程序能将字符串Program!反向打印出来,请填空。#include<stdio.h>void out(char *str){char *s

以下程序能将字符串Program!反向打印出来,请填空。

#include<stdio.h>

void out(char *str)

{char *s=______;/*第一空*/

if(*s==NULL)return:

while(______)s++;/*第二空*/

s--;

printf("%c\n",*s);

______=NULL;/*第三空*/

out(str);

}

main()

{char c[]="Program!";

out(c);}

点击查看答案
第5题
‌以下程序的执行结果是()。‏#include‏int func(int );‏void main()‏{int a=1,i;for(i=0;i<4;i++)‏{print("%3d",func(a+i));}}‏int func(int b)‏{static int i;‏return b+i;}

A.1 2 3 4

B. 1 3 5 7

C. 0 1 2 3

D. 2 3 4 5

点击查看答案
第6题
以下程序运行的结果是【 】。 include<conio.h> include<stdio.h> define M 100 v
oid fun(int m,int*a,int*n) { int i,j=0; for(i=1;i<=m;i++) if(i%7==0‖i%11==0) a [j++]=i; *n=j;} main() { int aa[M],n,k; clrscr(); fun(10,aa,&n); for(k=0;k<n;k++) if((k+1)%20==0)printf("\n"); else printf("%4d",aa[k]); printf("\n");}

点击查看答案
第7题
有两个C程序文件T18.c和myfun.c同在VC系统目录(文件夹)下,其中T18.c文件如下: include <st

有两个C程序文件T18.c和myfun.c同在VC系统目录(文件夹)下,其中T18.c文件如下: include <stdio.h> include "myfun.c" main() { fun(); prinff("\n"); } myfun.c文件如下: void fun() { char s[80],c;int n=0; while((c=getchar())! :\n) s[n++] =c; n--; while (n>=0) prinff("%c" , s [n--] ); } 当编译连接通过后,运行程序T18时,输入"Thank!”,则输出结果是【 】。

点击查看答案
第8题
下面程序的运行结果是()。 include<stdio.h> define P0WER(x) ((x)*(x)) void mai

下面程序的运行结果是()。 include<stdio.h> define P0WER(x) ((x)*(x)) void main() { int i=1; while(i<=4) { printf("%d\t",P0WER(i++)); } printf("\n"); }

A.2 3

B.5 7

C.1 9

D.2 12

点击查看答案
第9题
下面程序的运行结果()。 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.程序不正确

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

下述程序的输出结果是【 】。 include <stdio.h> void main() { char c1[20]="1234"; char c2[20]="5678"; char *p1,*p2; p1=c1; p2=c2; while(*p1++) while(*p1++=*p2++); printf("%s,c1); }

点击查看答案
第11题
阅读下面程序,执行后的结果为()。 include“stdio.h” void fun(int*a,int*b) { int k; k=

阅读下面程序,执行后的结果为()。 include“stdio.h” void fun(int*a,int*b) { int k; k=5; *a=k; *b=*a+k; ) main() { int*a,*b,x=10,y=15; a=&x; b=&y, fun(a,b); printf(“%d,%d\n”,*a,*b); }

A.10,15

B.5,15

C.5,10

D.15,10

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