Yes..you are correct..If....else is a conditional statement...and a conditional statement can be used as a loop...
if( i <= 50)
would print hello 50 times....
I'm not too sure about that.. I've never messed with C before, however, I can't imagine the logic being different than Java or C++. Assuming it is similar, your above would only execute the printf statement once.
To be exact, the integer i would be set to 0, then the condition would be checked (0 <= 50 equates to true), the printf statement would be executed and i would be incremented by 1. After that, the program would end/exit the if statement and terminate. However, had the "if" been replaced with a "while" the code would execute as desired..
Could be wrong though.
Sent from my Nexus 4 using Tapatalk