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

[填空题]以下程序运行后的输出结果是______。 #define Power2(x) x*x main( ) {int i=6,j=8; printf("%d/n",Power2(i+j)); }

更多"以下程序运行后的输出结果是______。 #define Pow"的相关试题:

[填空题]以下程序运行后的输出结果是______。
#define Power2(x) x*x
main( )
int i=6,j=8;
printf("%d/n",Power2(i+j));

[单项选择]以下程序运行后,单击按钮输出结果是
  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
A. 6 6 12
B. 8 5 10
C. 9 6 12
D. 8 10 10
[填空题]以下程序运行后的输出结果是【 】。 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); }
[单项选择]以下程序运行后,单击按钮输出结果是( )。   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
[填空题]以下程序运行后的输出结果是 【17】 。 struct NODE { int k; struct NODE*link; }; main( ) { struct NODE m[5],*p=m,*q=m+4; int i=0; while(p!=q){ p->k=++i;p++; q->k=i++;q--; } q->k=i; for(i=0;i<5;i++)printf("%d",m[i].k); printf("/n"); }
[填空题]以下程序运行后的输出结果是 【16】
struct NODE

int num;
stmct 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);

[填空题]以下程序运行后输出结果是 【18】 。 #include <stdio, h> void swap(int x.int y) { int t; t = x;x = y;y = t: printf( "% d % d ",x,y); } main ( ) { iht a=3,b=4: swap(a,b); prinff( "% d % d" ,a,b); }
[填空题]以下程序运行后的输出结果是 【10】 。 #include <iostream> #include <string> using namespace std; class Y; class X { iht x; char *strx; public: X(int a,char *str) { x=a; strx=new char[strlen(str)+1]; strcpy(strx,str); } void show(Y &ob); }; class Y { private: iht y; char *stry; public: Y(int b,char *str) { y=b; stry=new char[strlen(str)+ 1] ; strcpy(stry, str); } friend void X::show(Y &ob); }; void X::show(Y &ob) { cout<<strx<<","; cout<<ob.stry<<endl; } int main( ) { X a(10,"stringX"); Y b(20,"stringY"); a.show(b); return 0; }
[填空题]以下程序运行后的输出结果是 【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)+1];
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)+1];
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 O;

[单项选择]以下程序运行后的输出结果是
#include<stdio.h>
#include<stdlib.h>
main( )
 int *a, *b, *c;
 a=b=c(int *) malloc(sizeof(int));
 *a=1; *b=2; *c=3;
 a=b;
 printf("%d, %d, %d/n", *a, *b, *c);

A. 3,3,3
B. 2,2,3
C. 1,2,3
D. 1,1,3
[填空题]以下程序运行后的输出结果是 【11】
Private Sub Form _ Click( )
i=10 :j=0
Do
j=j+1
i=i-1
Loop while i>2
Print j;
End Sub
[填空题]以下程序运行后的输出结果是 【10】
#include <iostream>
#include <string>
using namespace std;
class Y;
class X

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

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

void show(Y &ob);
;
class Y

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

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

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

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

int main( )

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

[填空题]

以下程序运行后的输出结果是()。
#include
#include
#include
main( )
{ char *p;int i;
p=(char*)malloc(sizeof(char)*20);
strcpy(p,"welcome");
for(i=6;i>=0;i--) putchar(*(p+i));
printf("/n"); free(p);
}


[填空题]以下程序运行后的输出结果是
#include <stdio, h>
main( )
int a=3,b=4,c=5,t=99;
if(b<a && a<c) t=a;a=c;c=t;
if(a<e && b<c) t=b;b=a;a=t;
printf( "%d %d %d //n" ,a,b,e);

[单项选择]以下程序运行后的输出结果是
#include<stdio.h>
main( )
FILE *fp;int i=20,j=30,k,n;
fp=fopen("d1.dat","w");
fprintf(fp,"%d/n",i);
fprintf(fp,"%d/n",j);
fclose(fp);
fp=fopen("d1.dat","r");
fscanf(fp,"%d%d",&k,&n);
printf("%d%d/n",k,n);
fclose(fp);

A. 20 30
B. 20 50
C. 30 50
D. 30 20

我来回答:

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

订单号:

截图扫码使用小程序[完全免费查看答案]
请不要关闭本页面,支付完成后请点击【支付完成】按钮
恭喜您,购买搜题卡成功
重要提示:请拍照或截图保存账号密码!
我要搜题网官网:https://www.woyaosouti.com
我已记住账号密码