lundi 30 avril 2018

Working of Nested IF-Else Without the Braces

Can someone please explain me the working of Nested If-Else Statements written WITHOUT the Curly Braces.
I want to understand why Below Programme isn't giving me any output.
I've checked for all the 4 possibilities. (Outer, Inner)::(True, True),(True, False),(False, True),(False, False).
I'm editing with CodeBlocks,using gcc compiler on Windows.

int main() 
{
  int n=0,m=0;
  if ( n = 0 )
       if ( m = 0 )
           printf("True");
       else printf("False");
  return 0;
}

Thank You.

Aucun commentaire:

Enregistrer un commentaire