Why is argc an 'int' (rather than an 'unsigned int')?

Viewed 6465

Why is the command line arguments count variable (traditionally argc) an int instead of an unsigned int? Is there a technical reason for this?

I've always just ignored it when trying rid of all my signed unsigned comparison warnings, but never understood why it is the way that it is.

13 Answers
Related