What does "While(n)" mean in C?

Hi all!

I've seen many time things like while(n) {...} or if(n) {...}.
What can it mean? Does it mean something such as “while variable n is undefined...”

I've tried searching, but I couldn't find the answer.

Can you help me? I'd appreciate it! :-)
Last edited on
It means that the expression inside the while or the if statement is converted to type bool and the result is used that to take the decision.
Last edited on
These conditions hold if n is non-zero.
Thanks a lot! ☺
Topic archived. No new replies allowed.