首页 > 继续教育
题目内容 (请给出正确答案)
[单选题]

考虑函数原型void test(int a,int b=7,char z=‘*’),下面的函数调用中,属于不合法调用的是()。

A.test(5);

B.test(5,8);

C.test(6,’#’);

D.test(0,0,’x’);

查看答案
答案
收藏
如果结果不匹配,请 联系老师 获取答案
您可能会需要:
您的账号:,可能还需要:
您的账号:
发送账号密码至手机
发送
安装优题宝APP,拍照搜题省时又省心!
更多“考虑函数原型void test(int a,int b=7,…”相关的问题
第1题
假定一个函数原型为“voidff(inta[],intn)”,则对应的函数指针类型为()。

A.*ff(int[],int)

B.int(*ff)(int*a,int)

C.void(*ff)(int*a,int)

D.void*ff(int*a,int)

点击查看答案
第2题
回答下面的问题(6分) (1).Void GetMemory(char **p, int num) { *p = (char *)mallo

回答下面的问题(6分) (1).Void GetMemory(char **p, int num) { *p = (char *)malloc(num); } void Test(void) { char *str = NULL; GetMemory(&str, 100); strcpy(str, "hello"); printf(str); } 请问运行Test 函数会有什么样的结果?

点击查看答案
第3题
类A中有唯一的一个公有成员函数f,对于类A的一个对象a,执行语句f(100);成功,那么f的函数原型可以为()。

A.void f(int&) const;

B.const A * f(const int );

C.A& f(int, int=50);

D.A f(const int&) const;

点击查看答案
第4题
以下代码有什么问题?struct Test{Test(int ) {}Test() {}void fun() {}};void main(void ){

以下代码有什么问题?

struct Test

{

Test(int ) {}

Test() {}

void fun() {}

};

void main(void )

{

Test a(1);

a.fun();

Test b();

53

b.fun();

}

点击查看答案
第5题
试题6: void GetMemory(char **p, int num ){ *p = (char *) malloc(num );} void Test(void

试题6:

void GetMemory(char **p, int num )

{

*p = (char *) malloc(num );

}

void Test(void )

{

char *str = NULL;

GetMemory(&str, 100 );

strcpy(str, "hello" );

printf(str );

}

点击查看答案
第6题
试题6:void GetMemory(char **p, int num ){*p = (char *) malloc(num );}void Test(void ){c

试题6:

void GetMemory(char **p, int num )

{

*p = (char *) malloc(num );

}

void Test(void )

{

char *str = NULL;

GetMemory(&str, 100 );

strcpy(str, "hello" );

printf(str );

点击查看答案
第7题
给出下面代码的输出()public class Test {public static void main(String[ ] args) {int[][]

A.0

B.1

C.2

D.4

点击查看答案
第8题
. char *GetMemory(void) { char p[] = "hello world"; return p; } void Test

. char *GetMemory(void) { char p[] = "hello world"; return p; } void Test(void) { char *str = NULL; str = GetMemory(); printf(str); } 请问运行Test 函数会有什么样的结果?

点击查看答案
第9题
. void Test(void) { char *str = (char *) malloc(100); strcpy(str, “hello”);

. void Test(void) { char *str = (char *) malloc(100); strcpy(str, “hello”); free(str); if(str != NULL) { strcpy(str, “world”); printf(str); } } 请问运行Test 函数会有什么样的结果?

点击查看答案
第10题
原型说明中没有指出返回类型的函数(包括主函数main),C++默认该函数的返回类型是void。()
点击查看答案
第11题
根据线程安全的相关知识,分析以下代码,当调用test方法时i10时是否会引起死锁并简要说明理由。p

根据线程安全的相关知识,分析以下代码,当调用test方法时i10时是否会引起死锁并简要说明理由。

public void test(int i)

{

lock(this)

{

if (i10)

{

i--;

test(i);

}

}

}

点击查看答案
退出 登录/注册
发送账号至手机
密码将被重置
获取验证码
发送
温馨提示
该问题答案仅针对搜题卡用户开放,请点击购买搜题卡。
马上购买搜题卡
我已购买搜题卡, 登录账号 继续查看答案
重置密码
确认修改