Skip to content

Instantly share code, notes, and snippets.

@samueltcsantos
Created April 29, 2017 15:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save samueltcsantos/d9c89ac5d8d5a991b5a06c93fa254428 to your computer and use it in GitHub Desktop.
Save samueltcsantos/d9c89ac5d8d5a991b5a06c93fa254428 to your computer and use it in GitHub Desktop.
How to read arguments from command line.
#include <stdio.h>
int main(int argc , char **argv){
for (int i=0; i < argc; ++i)
{
printf("argv[%d]: %s \n", i, argv[i]);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment