题目详情
当前位置:首页 > 职业培训考试
题目详情:
发布时间:2023-10-14 05:18:19

[单项选择]请读程序:
#include<stdio.h>
#include<string.h>
main( )

char*s1="AbCdEf",*s2="aB";
s1++;s2++;
printf("%d/n",strcmp(s1,s2));

上面程序的输出结果是_______。
A. 正数
B. 负数
C. 零
D. 不确定的值

更多"请读程序: #include<stdio.h> #include<"的相关试题:

[单项选择]请读程序:
#include<stdio.h>
main( )

int a,b;
for(a=1,b=1;a<=100:a++)
if(b>=20)break;
if(b%3=1”b+=3;continue;
b=5;

printf("%d/n",
A. ;
B. 8
C. 9
D. 10
[单项选择]有以下程序:
#include <iostream.h>
#include
void main( ) double d= 123.456789;
cout<<setprecision(3)<<d<<",";
cout<<setprecision(4)<<d<<",";
cout<<setprecision(5 )<<d<<end1;程序执行后的输出结果是( )。
A. 123,123.4,123.45
B. 123,123.5,123.46
C. 123,123,123.4
D. 123.456789,123.456789,123.456789
[单项选择]有以下程序
#include
main( )
{ char str[][20]={"Hello","Beijing"},*p=str;
printf("%d/n",strlen(p+20));
}
程序运行后的输出结果是()
A. 0
B. 5
C. 7
D. 20
[单项选择]有以下程序 #include main( ) {char c1,c2,c3,c4,c5,c6; scanf("%c%c%c%c",&c1,&c2,&c3,&c4); c5=getchar( ); c6=getchar( ); putchar(c1); putchar(c2); printf("%c%c/n",c5,c6); } 程序运行后,若从键盘输入(从第1列开始) 123<回车> 45678<回车> 则输出结果是______。
A. 1267
B. 1256
C. 1278
D. 1245
[单项选择]有以下程序:
#include <stdio.h>
#include <string.h>
main( )
char p[] = 'a','b','c'] ,q[10] = 'a','h','c'
prinff( "% d % d/n" , strlen (p) , strlen (q) );
以下叙述中正确的是( )。
A. 在给p和q数组赋初值时,系统会自动添加字符串结束符,故输出的长度都为3
B. 由于P数组中没有字符串结束符,长度不能确定;q数组中字符串长度为3
C. 由于q数组中没有字符串结束符,长度不能确定;p数组中字符长度为3
D. 由于p和q数组中没有字符串结束符,故长度都不能确定
[单项选择]有以下程序
#include<stdio.h>
main( )
unsigned char a=8, c;
c=a>>3;
printf("%d/n", c);

程序运行后的输出结果是______。
A. 32
B. 16
C. 1
D. 0
[单项选择]有以下程序:
#include <stdio.h>
main( )
unsigned char a,b;
a=413;
b=4&3;
printf("%d%d/n",a,b);

执行后的输出结果是( )。
A. 7 0
B. 0 7
C. 1 1
D. 43 0
[单项选择]下面程序的运行结果是
#include<iostream.h>
void main( )

int i=1;
while(i<=8)
if (++i%3!=2)continue;
else cout <<i;

A. 25
B. 36
C. 258
D. 369
[单项选择]下列程序的运行结果为
#include<iostream.h>
Void main( )

int a=2;
iht b=a+1;
cout <<a/b <<end1;

A. 0.66667
B. 0
C. 0.7
D. 0.66666666…
[单项选择]执行下列程序段,结果是
#include<iostream.h>
void main( )
int x=40;
char y='C';
int n;
n=(x&0xff)&&(y>'B');
cout<<n;
A. 0
B. 1
C. 2
D. 3
[单项选择]下面程序的运行结果为
#include<iostream.h>
void main( )

for(int a =0,x=0;!x&&a<=10;a++)

a++;

cout < < a < < endl;

A) 10 B) 11 C) 12 D) 0
[单项选择]下列程序的执行结果为

#include<iostream.h>

void main( )



int a=3,b=0;

int * p=&a;

b=+a++;

cout < < * p < < "," < < b < < endl;


A. 3,4
B. 4,3
C. 3,4
D. 4,4
[单项选择]有以下程序:
#include <string.h>
main( )
char p[20]='a','b','c','d',q[]="abc",r[]="abcde";
strcat(p,r); strcpy(p+strlen(q),q);
printf("%d/n",strlen(p));

程序运行后的输出结果是( )。
[单项选择]有以下程序
#include<iostream.h>
void main( )
int a=5,b=0,c=0;
if(a=b+c)cout<<"***"<<endl;
else cout<<"$$$"<<<endl;
下列选项叙述正确的是( )。
A. 有语法错不能通过编译
B. 可以通过编译但不能通过连接
C. 输出***
D. 输出$$$
[单项选择]有以下程序
#include<stdio.h>
main( )
char b, c; int i;
b='a'; c='A';
for(i=0; i<6;i++)
if(i%2) putchar(i+b);
else putchar(i+c);
printf("/n");

程序运行后的输出结果是______。
A. ABCDEF
B. AbCdEf
C. aBcDeF
D. abcdef
[单项选择]有如下程序:
#include<stdio.h>
main( )
int n=9;
while(n>6)n--;printf("%d",n);

该程序的输出结果是( )。
A. 987
B. 876
C. 8765
D. 9876
[单项选择]以下程序运行后的输出结果是
#include <stdio.h>
main( )
char a=4:
printf("%d/n",a=a<<1);

A. 40
B. 16
C. 8
D. 4
[单项选择]下列程序的输出结果是( )。
#include<stdio.h>
main( )
int a=4;
print f("%d/n",(a+=a-=a*
A. );

我来回答:

购买搜题卡查看答案
[会员特权] 开通VIP, 查看 全部题目答案
[会员特权] 享免全部广告特权
推荐91天
¥36.8
¥80元
31天
¥20.8
¥40元
365天
¥88.8
¥188元
请选择支付方式
  • 微信支付
  • 支付宝支付
点击支付即表示同意并接受了《购买须知》
立即支付 系统将自动为您注册账号
请使用微信扫码支付

订单号:

请不要关闭本页面,支付完成后请点击【支付完成】按钮
恭喜您,购买搜题卡成功
重要提示:请拍照或截图保存账号密码!
我要搜题网官网:https://www.woyaosouti.com
我已记住账号密码