1.
a 自動存儲,內部鏈接
b 靜態存儲,外部鏈接
c 靜態存儲,內部鏈接
d 靜態存儲,無鏈接
2. using聲明只導入聲明的名稱,using編譯指令導入所以該名稱空間下的名稱;如果程序聲明瞭一個跟要導入的namespace的名稱相同的名稱,則不能使用using聲明該名稱;如果使用了using編譯指令,則程序函數聲明的名稱會隱藏名稱空間相同名稱的變量
3.就是在所有cin和cout前面加上std::
4. using std::cout;
using std::cin
5. 將average函數定義成靜態函數
file1
static int average (int, int);
file2
static double average (int, int);
6.
10
4
0
Other: 10, 1
another(): 10, -4
7.
1
4, 1, 2
2
2
4, 1, 2
2