题目详情
当前位置:首页 > 职业培训考试
题目详情:
发布时间:2023-11-30 06:23:29

[单项选择]下面程序的输出结果是( )。
#include<stdio.h>
#include<string.h>
main( )
char p1[]="WHO",p2[]="who",str[50]="xyz";
strcpy(str+1,strcat(p1,p2));
printf("%s",str);
A. xyzWHOwho
B. zWHOwho
C. zWHOwho
D. xWHOwho

更多"下面程序的输出结果是( )。 #include<stdio.h> "的相关试题:

[单项选择]下面程序的输出结果是( )。
#include<stdio.h>
#include<string.h>
main( )
char p1[]="WHO",p2[]="who",str[50]="xyz";
strcpy(str+1,strcat(p1,p2));
printf("%s",str);
A. xyzWHOwho
B. zWHOwho
C. zWHOwho
D. xWHOwho
[单项选择]下列程序的输出结果是( )。
#include<stdio.h>
#include<string.h>
main( )
char a[]="/n123//";
printf("%d,%d/n",strlen(a),sizeof(a));

A. 5,6
B. 5,5
C. 6,6
D. 6,5
[单项选择]以下程序运行后的输出结果是
#include<stdio.h>
#include<string.h>
main( )
 char x[]="STRING";
 x[0]=0; x[1]='/0'; x[2]='0';
 printf("%d%d/n", sizeof(x),strlen(x));

A. 6 1 B) 7 0 C) 6 3 D) 7 1
[单项选择]下述程序的运行结果是( )。
#include<stdio.h>
#include<string.h>
main( )
char*s1="abDuj";
char*s2="ABdUG":
int t;
t=strcmp(s1,s2);
printf("%d",t);

A. 正数
B. 负数
C. 零
D. 不确定的值
[填空题]设有下列程序: #include<stdio.h> #include<string.h> main( ) { int i; char si 10],ti 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>,则程序的输出结果是______。
[单项选择]下面程序输出的结果是什么 ( )
public class Quiz2

public static void main(String args[])

try throw new MyException( );
catch(Exception e)

System.out.println("It’s caught!");
finally
System.out.println("It’s finally caught!");



class MyExeeption extends Exception
A. It’s finally caught!
B. It’s caught!
C. It’s caught!/It’sfinally caught!
D. 无输出
[单项选择]下面程序输出的结果是( )。 #include<iostream> using namespace std; int test(int n1,int n2) {return n1 +n2;} float test (int f1,float f2){return f1-f2;} float test(float x,float y){return(x+y)/2;} float test(float x,int y){return(x+y)*2;} void main( ){ int a1=10; float a2=2.5f; cout<<test(a1,a2); }
A. 12.5
B. 7.5
C. 6.25
D. 25
[单项选择]下面程序输出的结果是( )
main( )
struct cmplx
int x;int y; cnum[2]=1,3,2,7;
printf("%d/n",cnum[0].y/cnum[0].x*cnum[1].x);

A. 0
B. 1
C. 3
D. 6
[单项选择]下面程序输出的结果是
#include<iostream.h>
void main( )
int i;
int a[3][3]=1,2,3,4,5,6,7,8,9;
for(i=0;<3;i++)
cout<<a[2-i][i]<<" ";

A. 1 5 9
B. 7 5 3
C. 3 5 7
D. 5 91
[单项选择]下面程序输出的结果是( )。
#include<stdio.h>
main( )

char *a="1234";
fun(a);
printf("/n");

fun(char *s)

char t;
if(*s)
t=*S++;fun(s);
else return;
if(t!='/0')
putchar(t);

A. 1234
B. 4321
C. 1324
D. 4231
[单项选择]下面程序的输出结果是
public class Test
 public static void main(String[] args)
  int[]array=2,4,6,8,10;
  int size=6;
  int result=-1:
  try
   for(int i=0;i<size&&result==-1;i++)
    if(array[i]==20)result=i;
catch(ArithmeticException e)
   System.out.println("Catch---1");
  catch(ArrayIndexOutOfBoundsException e)
   System.out.println("Catch---2");
  catch(Exception e)
   System.out.println("Catch---3");
  
 

A. Catch---1 B) Catch一--2 C) Catch---3 D) 以下都不对

我来回答:

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

订单号:

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