Advertisement

Input Handling

  • Mikael Olsson
Chapter

Abstract

When a C program is executed, it can accept arguments that are passed to it from the command line. These command-line arguments are useful for controlling the behavior of the program from outside the code. The arguments are passed to the main function, which is then set to accept two parameters as shown here.

int main(int argc, char* argv[]) {}

Copyright information

© Mikael Olsson 2019

Authors and Affiliations

  • Mikael Olsson
    • 1
  1. 1.Hammarland, Länsi-SuomiFinland

Personalised recommendations