当发生Form_Click事件时,下列程序的输出结果是( )。 Private m As Integer,n As Integer Private Sub Form_Click() Dim k As Integer,p As Integer k=6:p=60 Call sub1(k,p) Print m,n,m,k,p Call sub1(k,p) Print m,n,k,p End Sub Private Sub Form_Load() m=7 n=70 End Sub Public Sub sub1(x As Integer,ByVal y As Integer) Dim m As Integer n=n+5 m=n+x+y x=x+y y=x+y End Sub
A.7 75 66 60 7 80 126 60
B.7 75 66 60 7 75 126 60
C.7 75 66 60 7 80 66 60
D.7 75 66 60 7 75 66 60
第1题:
有以下程序: #include <iostream> using namespace std; class sample { private: int n; public: sample(){} sample(int m) { n=m; } void addvalue(int m) { sample s; s.n=n+m; *this=s; } void disp () { cout<<"n="<<n<<endl; } }; int main() { sample s (10); s.addvalue(5); s.disp(); return 0; } 程序运行后的输出结果是
A.n=10
B.n=5
C.n=15
D.n=20
第2题:
有以下程序: #include <iostream> using namespace std; class sample { private: iht n; public: sample(){} sample(int m) { n=m; } void addvalue(int m) { sample s; s.n=n+m; *this=s; } void disp() { cout<<"n="<<n<<end1; } }; int main() { sample s(10); s.addvalue(5); s.disp(); return 0; } 程序运行后的输出结果是
A.n=10
B.n=5
C.n=15
D.n=20
第3题:
若有以下程序:
include <iostream>
using namespace std;
class Sample
{
private:
const int n;
public:
Sample(int i) :n(i) {)
void print()
{
cout<<"n="<<n<<end1;
}
};
int main()
{
sample a(10);
a.print();
return 0;
}
上述程序运行后的输出结果是【 】。
第4题:
若有以下程序: #include<iostream> using namespace std; class sample { private: int n; public: sample(){} sample(int m) { n=m; } void addvalue(int m) { sample s; s.n=n+m; *this=s; } void disp() { cout<<"n"=<<n<<end1; } }; int main() { sample s(10); s.addvalue(5); s.disp(); return 0; } 程序运行后的输出结果是
A.n=10
B.n=5
C.n=15
D.n=20
第5题:
当Form_Click事件发生时,程序输出的结果是 ______。 Private Sub Form. Click() Dim a As Integer,b As Integer,c As Integer a=1: b=1 Print a; b Do c=a+b Print c a=b:b=c Loop Until c>=5 End Sub
A.1 1 1
B.2 3 5
C.2 5 7
D.2 3 4
第6题:
有以下程序
inculde <stdio.h>
main()
{ int m,n;
scanF(“%d%d”,&m&n);
While(m!=n)
{ While(m>n)m=m-n;
While(m<n)n=n-m;
}
PrintF(“%d\n”,m);
}
程序运行后,当输入14 63<回车>时,输出结果是【 】。
第7题:
当发生Form_ Click 事件后,下面这段程序代码的执行结果为在窗体中输出______。 Option Explicit Private Sub Form. Click () Dim num As String * 1, n As Integer Open "C:\ Check. txt" For Random As #10 For n = 1 To 6 num = Chr(n + 64) Put %10, n, num Next n Seek #10, 3: Get #10, , num Print Loc(10); Seek(10) End Sub
A.3 4
B.4 5
C.5 3
D.3 3
第8题:
程序的输出结果是【 】。
include <iostream>
using namespace std;
class A{
public:
A(){a=b=2;}
A(int i,int j){a=i;b=j;}
void display(){cout<<a<<b;}
private:
int a,b;
};
void main(){
A m,n(4,8);
m.display();
n.display();
}
第9题:
( 8 )有以下程序
#include <stdio.h>
main ()
{ int m,n;
scanf ( " %d%d " ,&m,&n ) ;
while ( m!=n )
{ while ( m>n ) m=m-n;
while ( m<n ) n=n-m;
}
printf ( " %d\n " ,m ) ;
}
程序运行后,当输入 14 63 < 回车 > 时,输出结果是 【 8 】 。