# MOXA 線上考題 ###### tags: `Interviews` 1. set/clear val 的其中一個 bit - fun(int *val, int n) : 把 val 的第 n 個 bit 設為 1 2. bitwise 運算 ```c= long ans = 0; short a = 0x1234; short b = 0x5600; ans += a << 16; ans += b << 0; ans += (b >> 2) + 0x22; ans = ? ``` 3. 指標運算 ```c= #include <stdio.h> main() { char a[27] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; char *tmp = a + 10; printf("%c", *(tmp - 10))); printf("%c", &tmp[3] + 20); } ``` 4. 大小寫轉換 5. remove listnode - fun(List *head, char *str) : 假如 node 上的 name 跟 str 一樣,刪除 node