中软集团笔试题.docx

上传人:b****3 文档编号:4994415 上传时间:2023-05-07 格式:DOCX 页数:6 大小:14.74KB
下载 相关 举报
中软集团笔试题.docx_第1页
第1页 / 共6页
中软集团笔试题.docx_第2页
第2页 / 共6页
中软集团笔试题.docx_第3页
第3页 / 共6页
中软集团笔试题.docx_第4页
第4页 / 共6页
中软集团笔试题.docx_第5页
第5页 / 共6页
中软集团笔试题.docx_第6页
第6页 / 共6页
亲,该文档总共6页,全部预览完了,如果喜欢就下载吧!
下载资源
资源描述

中软集团笔试题.docx

《中软集团笔试题.docx》由会员分享,可在线阅读,更多相关《中软集团笔试题.docx(6页珍藏版)》请在冰点文库上搜索。

中软集团笔试题.docx

中软集团笔试题

中软集团笔试题

 

中软集团题目

 

目一

 

一.简答题.

 

1.避免死锁的方法有哪些?

 

2.在Sybase数据库中注册用户与数据库用户有什么区别?

 

3.在MSSQL_Server数据库中通过什么约束保证数据库的实体完整性

 

4.内存有哪几种存储组织结构.请分别加以说明

 

5.JAVA中的Wait()和notify()方法使用时应注意些什么?

 

6.用户输入一个整数.系统判断,并输出是负数还是非负数,请设计测试用例.

 

7.操作系统中的同步和互诉解决了什么问题

 

8.UNIX中init

 

二.编写类String的构造函数,析构函数和赋值函数

 

已知类String的原型为

 

classstring

 

{

 

public:

 

string(constchar*str=null);//普通构造函数

 

string(conststringother);//拷贝构造函数

 

---string(void);

 

stringoperate=(conststringother);//赋值函数

 

private:

 

char*m-data;//用于保存字符串

 

};

 

请编写string的上述4个函数

 

三.有关内存的思考题

 

1.voidgetmemory(char*p)

 

{p=(char*)mallol(100);

 

}

 

voidtest(void)

 

{

 

char*str=null;

 

getmemory(str);

 

strcpy(str,hello,world);

 

printf(str);

 

}

 

请问运行Test函数会有什么样的结果

 

2.char*getmemory(void)

 

{charp[]=helloworld

 

returnp;

 

}

 

voidtest(void)

 

{

 

char*str=null;

 

str=Getmemory();

 

printf(str);

 

}

 

请问运行Test函数会有什么样的结果.

 

笔试题目二

 

问题:

 

Writeafunctiontogetthesecondmaximumnumberinanintegerarray.(请写程序返回一个数组中第2大的数)

 

intgetsecond(inta[])

 

答案:

 

intgetsecond(inta[],intnLength)

 

{

 

intnMax=-1000,nSec=0;

 

for(inti=0;inLength;i++)

 

{

 

if(nMaxa[i])

 

{

 

nSec=nMax;

 

nMax=a[i];

 

}

 

else

 

{

 

if(a[i]nSec)

 

nSec=a[i];

 

}

 

}

 

returnnSec;

 

}

 

展开阅读全文
相关资源
猜你喜欢
相关搜索
资源标签

当前位置:首页 > 解决方案 > 学习计划

copyright@ 2008-2023 冰点文库 网站版权所有

经营许可证编号:鄂ICP备19020893号-2