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

已知程序清单如下()#include<stdio.h>main(){char c1,c2;scanf("%c,%c",&c1,&c2);switch(c1){ca

已知程序清单如下()

#include<stdio.h>

main()

{char c1,c2;

scanf("%c,%c",&c1,&c2);

switch(c1)

{

case 'a':printf("100");break

case 'b':

{switch(c2)

{case'+':printf("90");break;

case'-':printf("85");)break

}break;

}

}

当输入"b,-"时,程序的输出结果是

A.100

B.90

C.85

D.不确定

查看答案
答案
收藏
如果结果不匹配,请 联系老师 获取答案
您可能会需要:
您的账号:,可能还需要:
您的账号:
发送账号密码至手机
发送
安装优题宝APP,拍照搜题省时又省心!
更多“已知程序清单如下()#include<stdio.h>mai…”相关的问题
第1题
若有如下程序: include "stdio.h" main() { char s[30]; Strcpy(&S[0],"

若有如下程序: include "stdio.h" main() { char s[30]; Strcpy(&S[0],"adc"); Strcpy(&S[1],"def"); strcpy(&S[2],"gh");; printf("%S\n",s); 则程序运行后的输出结果是【 】。

点击查看答案
第2题
若有如下程序: include"stdio.h" main() {char s[30]; strcpy(&s[0],"abc"); st

若有如下程序: include"stdio.h" main() {char s[30]; strcpy(&s[0],"abc"); strcpy(&s[1],"de"); strcpy(&s[2],"f"); printf("%s\n",s); } 则程序运行后的输出结果是【 】。

点击查看答案
第3题
有两个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!”,则输出结果是【 】。

点击查看答案
第4题
在C盘根目录下创建一个名为”c.txt”的文本文件,文本文件的内容从键盘读取,直到遇到"\n"(回车键)为

在C盘根目录下创建一个名为”c.txt”的文本文件,文本文件的内容从键盘读取,直到遇到"\n"(回车键)为止。程序清单如下:

#include<stdio.h>

#included<______>/*第一空*/

void main()

{FILE*fp;

char c;

if((fp=fopen("C:\c.txt","______"))==NULL)/*第二空*/

{printf("can not open file!\n");exit(0);)

while((______)!=='\n')/*第三空*/

fput(c,fp);

fclose(fp);

}

点击查看答案
第5题
已知在ASCⅡ代码中,字母A的序号为65,以下程序输出的结果是______。#include<stdio.h>main(){char c

已知在ASCⅡ代码中,字母A的序号为65,以下程序输出的结果是______。

#include<stdio.h>

main()

{char c1='A',c2='Y';

printf("%d,%d\n",c1,c2);

}

点击查看答案
第6题
设有下列程序: include<stdio.h> include<string.h> main() { int i; ch

设有下列程序: include<stdio.h> include<string.h> main() { int i; char s[10],t[10]; gets(t); for(i=0;i<2;i++) {gets(s); if(strcmp(t,s)<0) strcpy(t,s); } printf("%s\n",t); } 程序运行后,从键盘上输入(<CR>代表回车符):CDEF<CR>BADEF<CR>QTHRG<CR>,则程序的输出结果是______。

点击查看答案
第7题
以下程序运行后的输出结果是【 】。 include <stdio.h> define S(x) 4 * x * x + 1

以下程序运行后的输出结果是【 】。 include <stdio.h> define S(x) 4 * x * x + 1 main() { int i=6,j=8; prinff("% d \ n" , S(i + j) ); }

点击查看答案
第8题
有以下程序#include<stdio.h>main(){char s[]="159",*P;p=s;printf("%C",*p++);printf("%C",*p++

有以下程序

#include<stdio.h>

main()

{char s[]="159",*P;

p=s;

printf("%C",*p++);

printf("%C",*p++);

}

程序运行后的输出结果是______。

点击查看答案
第9题
#include<stdio.h>struct mine{int qa,qb,qc;};main(){struct mine s[2]={{1,2,3},{4,5,6}};int

#include<stdio.h>

struct mine{int qa,qb,qc;};

main()

{struct mine s[2]={{1,2,3},{4,5,6}};

int answer;

answer=s[0].qa%s[1].qb;

printf("%d\n",answer);

}

程序运行结果是:______

点击查看答案
第10题
#include<stdio.h>int fun(char*s){char*p=s;while(*p!='\0')p++;return(p-s);}main(){printf("%

#include<stdio.h>

int fun(char*s)

{char*p=s;

while(*p!='\0')p++;

return(p-s);}

main()

{printf("%d\n",fun("hello world"));

}

程序运行结果是:______

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