c语言if语句the c programming language 第二版练习题

#include
#include

int main()
{
int a,b;

b = 0;
while ( (a = getchar()) != EOF)
{
    if ( a == ' ')
    {
        if (b == 0)
        {
            b =1;
            putchar(a);
        };
    };
    if ( a != ' ')
    { 
        b = 0;
        putchar (a);
    };
};
system("pause");
return 0;

}
我想问的是:
if (b == 0)
{
b =1;
putchar(a);
};
这段if语句中运行到b = 1 时这段if语句会退出吗?
此题来自the c programming language 第二版中exercise 1-9 wirte a program to copy its input to its output ,replacting each string of one or more blanks by a single blank.刚学
谢谢各位了

不会,程序是自上向下,进入if语句中,只有完全执行完后才能退出,除非里面遇到跳转语句