数据库:抽出部门,平均工资,要求按部门的字符
串顺序排序,不能含有"human resource"部门,
employee 结构如下:employee_id, employee_name,
depart_id,depart_name,wage
查看答案
在不用第三方参数的情况下,交换两个参数的值
#i nclude <stdio.h>
试题4:为什么标准头文件都有类似以下的结
构?
#ifndef __INCvxWorksh
#define __INCvxWorksh
#ifdef __cplusplus
extern "C" {
#endif
/*...*/
#ifdef __cplusplus
}
#endif
#endif /* __INCvxWorksh */
下面代码有什么问题?
Void test2()
{
char string[10], str1[10];
for(i=0; i<10;i++)
{
str1[i] ='a';
}
strcpy(string, str1);
}
试题7:编写类String 的构造函数、析构函数
和赋值函数,已知类String的原型为:
class String
{
public:
String(const char *str = NULL); // 普通构造函
数
String(const String &other); // 拷贝构造函数
~ String(void); // 析构函数
String & perate =(const String &other); // 赋值
函数
private:
char *m_data; // 用于保存字符串
};