题目详情
当前位置:首页 > 职业培训考试
题目详情:
发布时间:2024-03-07 18:06:10

[单项选择]以下程序在VC6平台上编译运行,程序运行后的输出结果是
#include<stdio.h>
main( )
 int s, t, A=10; double B=6;
 s=sizeof(A); f=sizeof(B);
 printf("%d, %d/n", s, t);

A. 2,4
B. 4,4
C. 4,8
D. 10,6

更多"以下程序在VC6平台上编译运行,程序运行后的输出结果是 #incl"的相关试题:

[填空题]以下程序运行后输出结果是 【8】 。   #include   main( )   { int i, j;    for(i=6;i>3;i--) j=i;     printf("%d%d/n",i,j);   }
[填空题]以下程序运行后输出结果是 【9】 。   #include   main( )  { int i,n[]={0,0,0,0,0}; for(i=1;i<=2;i++) { n[i]=n[i-1]*3+1; printf("%d ",n[i]); } printf("/n"); }
[填空题]以下程序运行后输出结果是 【7】 。   #include   main( )   { int a=37;    a%=9; printf("%d/n",a);   }
[填空题]以下程序运行后的输出结果是 【10】 。   #include   main( )   { char a;    for(a=0;a<15;a+=5)    { putchar(a+’A’); } printf("/n");   }
[填空题]以下程序运行后输出结果是 【11】 。 #include void fun(int x) { if(x/5>0) fun(x/5);  printf("/%dn",x);  } main( ) { fun(11); printf("/n"); }
[单项选择]以下程序运行后的输出结果是
#include<stdio.h>
struct st
int x,y; data[2]=1,10,2,20;
main( )
struet st *p=data;
printf("%d,",p->y);printf("%d/n",(++p)->x);

A. 10,1
B. 20,1
C. 10,2
D. 20,2
[单项选择]以下程序运行后,单击按钮输出结果是( )。   Private Sub Commandl_Click( )     Dim x As Integer,y As Integer,z As Integer     X=4:y=2: Z=3     Call Gopd(x,x,z)     Print x;X;Z     Call Gopd(x,y,y)     Print x;y;y   End Sub   Private Sub Gopd(x As Integer,y As Integer,z As Integer)     X=3 * Z + 1     y=2 * z     z=x + y   End Sub
[单项选择]以下程序运行后的输出结果是
#include <stdio.h>
main( )
struct STUchar name[9];char sex;double score[2];;
struct STU a="Zhao",’m’,85.0,90.0,b="Qian",’f’,95.0,92.0;
b=a;
printf("%s,%c,%2.0f,%2.0f/n",b.name,b.sex,b.score[0],b.score[1]);
A. Qian,f,95,92
B. Qian,m,85,90
C. Zhao,f,95,92
D. Zhao,m,85,90
[填空题]以下程序运行后的输出结果是【 】。    #include<iostream.h>    void fun(int x,int y)    { x=x+y;y=x-y;x=x-y;     cout<< x << "," <<y << " ,";=    void main( )    { int x=2,y=3;fun(x,y);      cout<< x << "," << y << endl;=
[填空题]以下程序运行后的输出结果是 【14】
#include <iostream>
#include <string>
using namespace std;
class Y;
class X

int x;
char *strx;
public:
X(int a, char *str)

x=a;
strx=new char[strlen(str)+l];
strcpy(strx,str);

void show(Y &ob) ;
;
class Y

private:
int y;
char *stry;
public:
Y(int b,char *str)

y=b;
stry=new char[strlen(str)+l];
strcpy(stry, str);

friend void X::show(Y &ob) ;
;
void X::show(Y &ob)

cout<<strx<<",";
cout<<ob.stry<<end1;

int main( )

X a(10,"stringX");
Y b(20,"stringY");
a. show (B) ;
return 0;

[填空题]

以下程序运行后的输出结果是()。
struct NODE
{int num;struct NODE *next;
};
main( )
{struct NODE s[3]={{1,’/0’},{2,’/0’},{3,’0’}},*p,*q,*r;
int sum=0;
s[0].next=s+1;s[1].next=s+2;s[2].next=s;
p=s; q=p->next; r=q->next;
sum+=q->next->num; sum+=r->next->next->num;
printf("%d/n",sum);
}


[填空题]以下程序运行后的输出结果是 【13】 。 #include main( ) { int n[2] , i, j; for(i=0;i<2;i++) n[i]=0; for(i=0;i<2;i++) for(j=0;j<2;j++) n[j]=n[i]+1; printf("%d/n",n[1]); }
[填空题]以下程序运行后的输出结果是【 】。 #include<string.h> main( ) {char ch[]="abc",x[3][4];int i; for(i=0;i<3;1++)strcpy(x[i],ch); for(i=0;i<3;i++)printf("%s",&x[i][i]; printf("/n"); }
[填空题]以下程序运行后的输出结果是【 】。 #include<string.h> void fun(char *s,int P,int k) {int i; for(i=p;i<k-1;i++)s[i]=s[i+2]; main( ) {char s[]="abcdefg"; fun(s,3,strlen(s));puts(s) }
[单项选择]以下程序运行后的输出结果是
#include< string.h>
main( )
char m[20]= 'a', 'b', 'c', 'd', n[]="abe", k[]="abcde";
strcpy (m+strlen (n), k); strcat (m, n);
prinff(" % d% d /n", sizeof(m), strlen (m));

A. 20 11
B. 9 9
C. 20 9
D. 11 11
[单项选择]以下程序运行后的输出结果是
#include<stdio.h>
union pw
int i;
char ch[2];
a;
main( )
a.ch[0]=13;a.ch[1]=0;printf("%d/n",a.i);
A. 13
B. 14
C. 208
D. 209

我来回答:

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

订单号:

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