hello,
I have a programming question, say I have the following C program:
main()
{
While (1)
{
if ( condition2)
{
Perform A
}
else
{
Perform B
}
Statement D
} //end while loop
} // end main loop
My question here is: will the program ever reach statementD? What I am thinking is that if condition 2 is met, it will perform A, and if not, then it will perfrom B. Then it will never get to the statement D because Im thinking that once the statement in the If section or the else section is performed, the program will go back to the begining and this process will continure for ever and not reach statment D ever.
I have a programming question, say I have the following C program:
main()
{
While (1)
{
if ( condition2)
{
Perform A
}
else
{
Perform B
}
Statement D
} //end while loop
} // end main loop
My question here is: will the program ever reach statementD? What I am thinking is that if condition 2 is met, it will perform A, and if not, then it will perfrom B. Then it will never get to the statement D because Im thinking that once the statement in the If section or the else section is performed, the program will go back to the begining and this process will continure for ever and not reach statment D ever.