Question: what is the difference between command-line arguments and stdin?
Answer: The difference is in how you access them. Arguments are accessible through argv . Standard input is accessible through the stdin file descriptor.