设f'(x)是连续函数,则∫f'(x)dx=______.
第1题
以下程序通过函数指针p调用函数fun,请在填空栏内,写出定义变量p的语句。 void fun (int*x,int*y) {……} main() { int a=10,b=20; ______;严定义变量p*/ p=fun;p(&a,&b); ……}
第2题
定义如下的基类A和派生类B:class A { public: virtual void fun() // 函数成员fun被声明为虚函数 { cout << “A :: fun() called”; } }; class B : public A { public: void fun() // 重写虚函数成员fun { cout << “B :: fun() called”; } }; 执行下列代码:A *p; // 定义基类A的对象指针p B bObj; // 定义派生类B的对象bObj p = &bObj; // 将基类指针p指向派生类对象bObj p->fun(); // 通过基类指针p调用虚函数成员fun 通过基类指针p调用虚函数成员fun,将自动调用哪个函数?()
A、A::fun()
B、B::fun()
C、先调用A::fun(),再调用B::fun()
D、语法错误
第3题
以下程序中,能够通过调用函数fun,使main函数中的指针变量p指向一个合法的整型单元的是
A.main() { int *p; fun(p); … } int fun(int *p) { ints; p=&s;}
B.main() { int *p; fun(&p); … } int fun(int **p) { int s; *p=&s;)
C.#include main() { int *p; fun(&p); … } int fun(int **p) *p=(int*)malloc(2);}
D.#include main() { iht *p; fun(p); … } iht fun(iht *p) { p=(int*)malloc(sizeof(int)); }
第4题
以下程序段中,能够通过调用函数fun(),使main()函数中的指针变量p指向一个合法的整型单元的是()。
A.main() {int*p; fun(p); … } int fun(int*p) {int s; p=&s; }
B.main {int*p fun(&p); … } iht fun(int**p) {int s; *p=&s;}
C.main() {int*p; fun(&p); } int fun(int**p) {*p=(int*)malloc(2);}
D.main() {int*p; fun(p); } int fun(int*p) {p=(int*)malloc(sizeo(int));}
第5题
以下程序中,能够通过调用函数fun,使main函数中的指针变量p指向一个合法的整型单元的是
A.main() { int *p; fun(p); ┆ } int fun(int *p) { int s; p=&s;}
B.main() { int *p; fun(&p); ┆ } int fun(int **p) { int s; *p=&s;}
C.#include<stdlib.h> main() { int *p; fun(&p); ┆ } int fun(int **p) { *p=(int*)malloc(2);}
D.#include<stdlib.h> main() { int *p; fun(p); ┆ } int fun(int *p) { p=(int*)malloc(sizeof(int));}
第6题
以下程序段中,能够通过调用函数fun,使main函数中的指针变量p指向一个合法的整型单元的是
A.main() { int*p; fun(p); ┇ } int fun(int *p) { int s;p=&s;}
B.main() { int*p; fun(&p); ┇ } int fun(int * *p) { int s;*p=&s;}
C.#include<stdlib.h> main() { int*p; fun(&p); ┇ } int fun(int * *p) { *p=(int*)malloc(2);}
D.#include<stdlib.h> main() { int*P; fun(p); ┇ } int fun(int *p) {p=(int*)malloc(sizeof(int));}
第7题
以下程序段中,能够通过调用函数fun,使main函数中的指针变量p指向一个合法的整型单元的是
A.main() { int*p; fun(p); … } int fun(int*p) {int s; p=&s; }
B.main { int *p; fun(&p); … } int fun(int**p) {int s; *p=&s; }
C.#include <stdlib.h> main() { int *p; fun(&p); … } int fun(int**p) {*p=(int*)malloc(2); }
D.#include <stdlib.h> main() { int *p; fun(p); … } int fun(int *p) {p=(int*)malloc(sizeof(int));}
为了保护您的账号安全,请在“上学吧”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!