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? Commented Jan 16, 2015 at 14:50

2 Answers 2

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.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.