首页 > 计算机等级考试
题目内容 (请给出正确答案)
[主观题]

有以下程序:#include<stdio.h>main(){int a=1,b=2,m=0,n=0,k; k=(n=b>a)||(m=a<b); printf("%d,%

有以下程序: #include <stdio.h> main() { int a=1,b=2,m=0,n=0,k; k=(n=b>a)||(m=a<b); printf("%d,%d\n",k,m); } 程序运行后的输出结果是()。

A.0,0

B.0,1

C.1,0

D.1,1

查看答案
答案
收藏
如果结果不匹配,请 联系老师 获取答案
您可能会需要:
您的账号:,可能还需要:
您的账号:
发送账号密码至手机
发送
安装优题宝APP,拍照搜题省时又省心!
更多“有以下程序:#include<stdio.h>main(){…”相关的问题
第1题
有以下程序:#include <stdio, h>void sum(int a[ ] ){a[0]=a[-1] +a[1];}main (){int a[10] = {

有以下程序:#include <stdio, h>void sum(int a[ ] ){ a[0]=a[-1] +a[1];}main (){ int a[10] = {1,2,3,4,5,6,7,8,9,10}; sum(&a[2]); prinff("% d \n",a[2]); }程序运行后的输出结果是()。

A.6

B.7

C.5

D.8

点击查看答案
第2题
有以下程序:#include <stdio, h>main(){int m =0256,n =256;printf("% o % o \n" ,m,n); 程序

有以下程序: #include <stdio, h> main() { int m =0256,n =256; printf("% o % o \n" ,m,n); 程序运行后的输出结果是() 。

A.0256 0400

B.0256 256

C.256 400

D.400 400

点击查看答案
第3题
有以下程序:#include <stdio, h>main(){char a1 ='M',a2 ='m'; printf("%c\n",(a1,a2));} 以下

有以下程序:#include <stdio, h>main(){ char a1 ='M',a2 ='m'; printf("%c\n",(a1,a2)); } 以下叙述中正确的是()。

A.程序输出大写字母M

B.程序输出小写字母m

C.格式说明符不足,编译出错

D.程序运行时产生出错信息

点击查看答案
第4题
有以下程序: #include <stdio, h>int a =2;int f(int n){ static int a: 3;intt=0;if(n%2){ stat

有以下程序: #include <stdio, h>int a =2;int f(int n){ static int a: 3; int t=0; if(n%2){ static int a=4;t+ =a++;} else { static int a=5;t+ :a++;} return t + a + +;main (){ int s=a,i; for(i=0;i<3;i++)s + =f(i); prinff("% d \n" ,s); }程序运行后的输出结果是()。

A.26

B.28

C.29

D.24

点击查看答案
第5题
以下程序的输出结果是 ______。#include<stdio>main(){int a=200;#define a 100printf("%d",a) ;

以下程序的输出结果是 ______。 #include<stdio> main() {int a=200; #define a 100 printf("%d",a) ; #undefa printf("%d",a) ; }

A.200 100

B.100 100

C.100 200

D.200 200

点击查看答案
第6题
有以下程序: #include <stdio, h>void swap1 (int c0[],int e1[] ){intt;t = c0[0]; c0[0]: c1 [

有以下程序: #include <stdio, h>void swap1 (int c0[],int e1[] ){ int t; t = c0[0]; c0[0]: c1 [0] ; c1 [0] = t;}void swap2(int * c0,int * c1){ int t; t= *c0; *c0= *c1; * c1 =t;}main(){ inta[2]={3.5}.b[2]={3,5}; swapl(a,a+1) ;swap2(&b[0],&b[1]); printf("% d %a %d %d \n" ,a[0] ,a[1] ,b[0] ,b[1] ); }程序运行后的车出结果是()。

A.3 5 5 3

B.5 3 3 5

C.3 5 3 5

D.5 3 5 3

点击查看答案
第7题
下列程序的执行结果是()。#include<stdio h>main{ int a,b,c;a=b=2,c=I;c=(a++)-1;printf(

下列程序的执行结果是()。

#include<stdio h>

main

{ int a,b,c;

a=b=2,c=I;

c=(a++)-1;printf("%d,0Ad",a,c);

c+=-a+++(b);printf("%d,%d",a,c);

)

A.3,14,1

B.3,14,2

C.2,04,1

D.2,14,1

点击查看答案
第8题
请编写函数fun(),其功能是:将s所指字符串中下标为偶数的字符删除,串中剩余字符形成的新串放在t所

请编写函数fun(),其功能是:将s所指字符串中下标为偶数的字符删除,串中剩余字符形成的新串放在t所指数组中。

例如,当s所指字符串中的内容为ABCDEFGHIJK,则在t所指数组中的内容应是BDFHJ。

注意:部分源程序给出如下。

请勿改动主函数main口其他函数中的任何内容,仅在函数fun的花括号中填入所编写的若干语句。

试题程序:

include<conio. h>

include<stdio .h>

include<string.h>

void fun(char *s,char t[])

{

}

main ()

char s[l00] ,t[l00];

clrscr ();

printf("%nPlease enter string S: ");

scanf("%s ",s);

fun(s,t);

prlntf("\nThe result is:%s\n ",t);

}

点击查看答案
第9题
有以下程序()

A.#include

B.02356

C.0235

D.235

E.2356

点击查看答案
第10题
有以下程序#include <stdio.h>#include <string.h>main(){ printf("%d\n",strlen (

有以下程序

#include <stdio.h>

#include <string.h>

main()

{ printf("%d\n",strlen ("ATS\n012\1") ); }

程序运行后的输出结果是

A)3

B)8

C)4

D)9

点击查看答案
第11题
有以下程序:#include<iostream.h>#include<iomanip.h>void main(){cout.fill('*');cout.width(10

有以下程序: #include<iostream.h> #include<iomanip.h> void main() { cout.fill('*'); cout.width(10); cout,<setiosflags(ios::left)<<123.45<<endl; } 程序执行后的输出结果是()

A.****123.45

B.**123.45**

C.123.45****

D.***123.45*

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