0

Very small question: Most probably you have seen the original text of the problem, so I'll just paste here the small extract:

"So that we can automate some tests of your code, we ask that your program’s last line of output be AMEX\n or MASTERCARD\n or VISA\n or INVALID\n, nothing more, nothing less, and that main always return 0."

What is meant under main is always 0?

1 Answer 1

1

It means your main function should always return 0; after doing its work. The return value of the main function at the same time is the exit code of your programme, with a value of 0 usually indicating that everything worked well, and a value other than 0 that there was some kind of error (with the specific value, ranging from 0..255, further specifying the kind of problem so the calling code can react).

You must log in to answer this question.

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