第四章 复习题
来源:互联网 发布:linux个人目录 编辑:程序博客网 时间:2024/06/05 11:46
本博客所以复习题都是自己回答,不保证答案正确性,如有错误,欢迎指出
1.
a.char actor[30];
b. short betsie[100];
c. float chuck[13];
d. long double dipsea[64];
2. array<char, 30> actor;
array<short, 100> betsie;
array<float, 13> chuck;
array<long double, 64> dipsea;
3. int odds[5] = {1, 3, 5, 7, 9};
4. int even = odds[0] + odds[4];
5. cout << ideas[1];
6. char str_char[13] = "cheeseburger";
7. string str = "Waldorf Salad";
8. struct fish {
char kind[30];
int weight;
float length;
};
9. fish fish1 = {"samon", 5, 2.8};
10. enum Response {Yes = 1, No = 0, Maybe = 2};
Response re = Yes;
11. double ted = 10;
double *pted = &ted;
cout << *pted;
12. float treacle[10];
float *p_treacle = treacle;
cout << *p_treable << " " << *(p_treacle+9) << endl;
13. int n;
cin >> n;
int *arr_p = new int [n];
delete [] arr_p;
vector<int> arr_v(n);
14. 字符串”home of the jolly bytes" 第一个字母h所在内存的地址
15. fish * fish_p = new fish;
fish_p ->weight = 5;
16. 只能读取第一个空格之前的字符。
17. #include <array>
#include <vector>
#include <string>
int main() {
std::vector<std::string> vec_str(10);
std::array<std::string, 10> vec_arr;
...
}
- 第四章 复习题
- c++第四章复习题
- (六十三)第四章复习题
- 计算机网络(自顶向下方法)(原书第4版)课后复习题解答(第四章)
- 第二章 复习题
- 第三章 复习题
- 13章复习题
- 第五章 复习题
- 第六章 复习题
- 第七章 复习题
- 第八章 复习题
- 第九章 复习题
- 第十章 复习题
- 第十二章 复习题
- 第十三章 复习题
- 第十四章 复习题
- 第十五章 复习题
- 第十六章 复习题
- 客户端主动断开webSocket
- python入门:对象的建立和使用(不涉及继承)
- 自定义View实现联系人快速查找
- 第四章 复合类型(4)
- 基于/proc伪文件系统的读取系统常见内核状态信息
- 第四章 复习题
- Hard 273题 Integer to English Words
- 【PHP】Window7环境下配置PHP7+Apache2.4 环境
- 第四章 编程练习
- python3.4.4 配置opencv3.1 解决pip版本不够的问题
- ARM ELF 镜像结构
- SQLite
- Django模板系统(非常详细)
- 在Ubuntu系统中安装wxpython