0

I used check50 to check my code and get it all right except "handle lack of argv[1]". It reports that"expected output, not an exit code of 1". Shouldn't I just return 1 when the argc is not 2 and argv[1] is not a positive integer?

1
  • What does your program when you don't add any argument? – supeindesu Jan 16 '15 at 14:50
1

Try printing \n to stdout before returning 1.

0

If your program is executed without any command-line arguments or with more than one command-line argument, your program should yell at the user and then return a value of 1. From the error message, you can see that check50 expects output printf() and not just a return 1;.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .