第1题:
阅读下面程序:
include<iostream.h>
void f(int n)
{
int x(5);
static int y(10);
if(n>0)
{
++x;
++y;
cout<<x<<","<<y<<endl;
}
}
void main()
{
int m(1);
f(m),
}
则该程序的输出结果是【 】
第2题:
阅读下列程序段,则程序的输出结果为 #include"stdio.h" #defineM(X,Y)(X)*(Y) #defineN(X,Y)(X)/(Y) main() {f int a=5,b=6,c=8,k; k=N(M(a,b),c); printf("%d\n",k);}
A.3
B.5
C.6
D.8
第3题:
设函数f(x)=e5x,则f(x)的n阶导数f(n)(x)=____.
第4题:
fun函数的功能是:通过键盘输入给x所指的整型数组所有元素赋值。在下划线处应填写的是( )。 #include<stdio.h> #define N 5 void fun(int x[N]) { int m; for(m=N-t;m>=O;m-)scanf("%d",____); }
A.%&X[++m]
B.&x[m+1]
C.x+(m++)
D.x+m
第5题:
有如下程序: #include<iostream> using namespace std; class Base{ int x; public: Base(int n=0):x(n){cout<<n;} int getX( )const{return x;} }; class Derived:public Base{ int y; public: Derived(int m,int n):y(m),Base(n){tout<<m;} Derived(int m):y(m){cout<<m;} }; int main( ){ Derived dl(3),d2(5,7); return 0; } 程序的输出结果是
A.375
B.357
C.0375
D.0357
第6题:
下列程序的输出结果是
#include "stdio.h"
#define M(x,y) x%y
main()
{ int a,m=12,n=100;
a=M(n,m);
printf("%d\n",a--);}
A.2
B.3
C.4
D.5
第7题:
在窗体上画一个名称为Command1的命令按钮,然后编写如下事件过程: Private Sub Command1_Click() m=1:n=1 Print"m="; m; ", n="; n Call subl((m), n) Print "m="; "; ", n="; n End Sub Private Sub subl(x, y) x=x+5 y=y+x Print "x="; x;", y="; y End Sub 程序运行后,单击命令按钮,则窗体上显示的内容是______。
A.m=1, b=1 x=6, y=7 m=1, b=1
B.m=1, b=1 x=6, y=7 m=6, b=7
C.m=1, b=1 x=6, y=7 m=1, b=7
D.m=1, b=1 x=6, y=7 m=6, b=1
第8题:
阅读下面程序:
include<iostream.h>
void fun(int n)
{
int x(5);
static int y(10);
if(n>0)
{
++x;
++y;
cout<<x<<","<<y<<end1;
}
}
void main()
{
int m(1);
fun(m);
}
则该程序的输出结果是______。
第9题:
下列程序的输出结果是
#include "stdio.h"
#defineM(x,y)x%y
main()
{ int a,m=12,n=100;
a=M(n,m);
printf("%d\n",a--);}
A.2
B.3
C.4
D.5
第10题:
有以下程序 main() { int m=3 n=4,X; X=-m++; x=x+8/++n; printf("%d\n",x); } 程序运行后的输出结果是
A.3
B.5
C.-1
D.-2