以下為一C 程式,它有3 個變數宣告敘述(variable declaration statements):(16 分)
試說明在A、B、C、D 四個標示出的位置中的可見變數(visible variable)。
這些可見變數分別是在那個敘述中宣告的?
void example(void) {
int u, v, w; /* declaration 1 */
.....
while (....) {
int v, w, x; /* declaration 2 */
..... /* <=== A */
while (....) {
int w, x, y; /* declaration 3 */
..... /* <=== B */
}
..... /* <=== C */
}
..... /* <=== D */
}