Command line arguments

What is argc, argv[]?

Thought Questions

  • What is the relationship between argc and argv? Specifically, what does argc tell us about how far we can iterate through argv?
  • What is the data type of argv?
    • What is the data type of the elements of argv? What does that mean if the user inputs, say, “18” or “5.22” at the command line?
  • Why might we want to collect information at the command line instead of after the program has started running?

Recommended Resources External to CS50