2013-12-16 2 views

답변

6

else 번으로 제어 할 필요가 없습니다. 당신이 필요로하는 것은 "Hello"을 인쇄하는 부작용이있는 false 조건입니다. 예를 들면

if (printf("Hello") == 0) // this condition is false, because printf returns the number of chars written 
{ 
    printf("Hi"); 
} 
else 
{ 
    printf("Hello"); 
}