二、變數、繫結、和資料型態(20 分)
Void sub() {
int count;
count = 7;
while ( … ) {
int count;
count += 1;…
}
sum = count * 5;…
}
⑴說明在 C++和 Java 語言中,上列敘述是否合法及其原因。 ⑵請討論其中變數 count 的記憶體配置的繫結(binding)以及有效範圍(scoping)。