面试中遇到的各种回答不上来的题目,慢慢整理
1. 大端小端
大端是高字节在低地址,低字节在高地址,类似于字符串,先读到的在高位
小端是高字节高地址,低字节低地址
2. C语言的函数指针数组定义方式
int (*fun_array[4]) (int,int) = {add, sub, mul, div};
3. C++ function
#include<functional>
std::function<int(int,int)> func = foo;
4. volatile、mutable分别怎么用,有什么区别?