网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
有如下的程序:
Private Sub Command1_Click()
Dim k As Integer,m AB Integer
Dim P As Integer
k=4:m=1
P=Fun(k,m) =Print P;
P=Fun(k,m) :Print P
End Sub
Private Function Fun(a As Integer,b As Integer)
Static m As Integer,i As Integer
m=5:i=2
i=i+m+1
m=i+a+b
Fun=m\2
End Function
单击命令按钮后,输出结果为
A. 2 2
B.4 4
C.5 5
D.6 6
参考答案
更多 “ 有如下的程序:Private Sub Command1_Click()Dim k As Integer,m AB IntegerDim P As Integerk=4:m=1P=Fun(k,m) =Print P;P=Fun(k,m) :Print PEnd SubPrivate Function Fun(a As Integer,b As Integer)Static m As Integer,i As Integerm=5:i=2i=i+m+1m=i+a+bFun=m\2End Function单击命令按钮后,输出结果为A. 2 2B.4 4C.5 5D.6 6 ” 相关考题
考题
有如下程序:Private Sub Command1_Click()Dim k As Integer, m As IntegerDim p As Integerk=4: m=1p=PC(k, m) : Print p;p=PC(k, m) : Print pEnd SubPrivate Function PC(a As Integer, b As Integer)Static m As Integer, i As Integerm=0: i=2i=i + m + 1m=i + a + bPC=mEnd Function程序运行后,输出的结果为( )。A.4 6B.6 6C.8 8D.10 12
考题
执行下列程序后,输出的结果是()。includedefine S(X)X*Xvoid main(){int a=9,k=3,m=2;
执行下列程序后,输出的结果是( )。 #include<stdio.h> #define S(X)X*X void main() { int a=9,k=3,m=2; a/=S(k+m)/S(k+m); printf("%d",a); }A.(*p) .data.aB.(*p) .a;C.p->data.aD.p.data.a
考题
现有如下程序段#include "stdio.h"int fun(int k,int *m){if(k%3)*m=k*k;else *m=k/3;}main(){ int (*p)(int,int *),m;p=fun;(*p)(78, m);printf( "%d\n",m);}则程序段的输出结果为A.24B.25C.26D.27
考题
有如下程序: Private Sub Command1_Click() Dim k As Integer,m As Integer Dim p As Integer k=4:m=1 p=PC(k,m):Print p; p=PC(k,m):Print p End Sub Private Function PC(a As Integer,b As Integer) Static m As Integer,i As Integer m=0:i=2 i=i + m + 1 m=i + a + b PC=m End Function 程序运行后,输出的结果为A.4 6B.6 6C.8 8D.10 12
考题
设有以下程序: include using namespace std; int main() {inta,b,k:4,m=6,*p1=k
设有以下程序:include<iostream>using namespace std;int main(){int a,b,k:4,m=6,*p1=k,*p2=m;a=p1==m;b=(*p1)/(*p2)+7;cout<<a<<b<<end1;return 0;}执行该程序后,a的值为【 】,b的值为【 】。
考题
有如下程序: Private Sub Command1_Click() Dim k As Integer,m As Integer Dim op As Integer k=4:m=1 p=PPC(k,m):Print op; p=PPC(k.m):Print op End Sub Private Function PPC(a As Integer,b As Integer) Static m As Integer,i As Integer m=0:i=2 i=i+m+1 m=i+a+b PPC=m End Function 程序运行后,输出的结果为A.4 6B.6 6C.8 8D.10 12
考题
有如下程序段#include "stdio.h"typedef struct aa{ int a; struct aa *next;} M;void set(M *k,int i,int *b){ int j,d=0; for(j=1;ji;j++) { k[j-1].next=k[j]; k[j-1].a=b[d++]; } k[j].a=b[d];}main(){ M k[5],*p; int d[5]={23,34,45,56,67}; set(k,5,d); p=k+1; printf("%d\n",________);}要输出45,则在下画线处应填入的选项是A.p-next-a B.++p-aC.(*p).a++ D.p++ -a
考题
以下程序的输出结果是______。includemain(){int k=4,m=1,p; p=func(k,m); printf("%d,
以下程序的输出结果是______。 #include<stdio.h> main() { int k=4,m=1,p; p=func(k,m); printf("%d,",p); p=func(k,m); printf("%d\n",p); } func(a,b) int a,b; { static int m=0,i=2; i+=m+1;m=i+a+b;return(m); }A.8,17B.8,16C.8,20D.8,8
考题
有如下的程序。 Private Sub Commandl_Click( ) Dim k As Integer, m As Integer Dim P As Integer k=4: m=1 P=Fun(k, m) : Print P; P = Fun ( k, m) : Print P End Sub Private Function Fun( a As Integer, b As Integer) Static m As Integer, i As Integer m=5:i=2 i=i+m+1 m=i + a + b Fun=m\2 End Function 单击命令按钮后,输出结果为A.2 2B.4 4C.5 5D.6
考题
已知类X的定义如下,为了实现将对象成员k的值修改为678,下面的哪条语句是正确的 ______。 class X{ private: int k; public: K(int n){k=n;} set(int n){k=m;} }; void fun(){ X a(10),*p=a; ______ }A.p->set(678);B.X(678):C.p->k=678;D.p.set(678);
热门标签
最新试卷