mercredi 31 août 2016

If statement followed by more statements

Is the code below a valid C/C++ code? If yes what is the behavior?

void abc()
{
 ....
}

..
..
void xyz()
 {
   if( "some condition" )
   {
     ...
    ...
   }abc();
 }

Specifically if it is valid, would abc() be executed only when the conditions true?

Aucun commentaire:

Enregistrer un commentaire