As we know printf stetment return the number of character printf("1") return 1 Then we go to condition Statment printf("0") returns 1 but here the statement is (!printf("0")) !1=0 and the condition get false and we get out from for loop