Can anyone help with my do-while statement?
It doesn't work when input file name is blank (empty return).

void
main(int argc, char *argv[])
{
char fileNameIn[20];
char fileNameOut[20] = { "\0" };


if(argc == 1) // 0 & 1; only the program name is input
{
do
{
printf("\n Enter the input file name: ");
fflush(stdin);
gets(fileNameIn);
} while (fileNameIn == NULL);

printf("\n Enter the output file name: ");
fflush(stdin);
gets(fileNameOut);
} ;

if (argc == 2 || fileNameOut == NULL) // two strings input
// (pgm10 and input fileName);
{ // output fileName is missing
printf("\n Please enter output file name: ");
fflush(stdin);
gets(fileNameOut);
} ;

if (argc == 3) // user inputs all 3 variables pgm10 fileNameIn
// fileNameOut
{
strcpy (fileNameIn, argv[1]);
strcpy (fileNameOut, argv[2]);
} ;

printf("\n argc = %d\n", argc);
printf(" Program name = %s\n", argv[0]);

if (argc == 2) { strcpy (fileNameIn, argv[1]); }
printf(" file name in = %s\n", fileNameIn);
if (argc == 3)
printf(" file name out = %s\n", argv[2]);
else
printf(" file name out = %s\n", fileNameOut);
}