The question stems from some code at the following url
In the code example they have a single if statement for the following
pFile = fopen ( "myfile.bin " , "rb" );
if (pFile==NULL) {fputs ("File error",stderr); exit (1);}
Why use a single if statement as opposed to if-else? Just curious
because I see this appear a lot in C code. Ie a single if statement vs
using if-else.
In the code example they have a single if statement for the following
pFile = fopen ( "myfile.bin " , "rb" );
if (pFile==NULL) {fputs ("File error",stderr); exit (1);}
Why use a single if statement as opposed to if-else? Just curious
because I see this appear a lot in C code. Ie a single if statement vs
using if-else.
Comment