Skip to content

Instantly share code, notes, and snippets.

@ShakibHabibi
Created December 30, 2018 07:14
Show Gist options
  • Save ShakibHabibi/532d9810346c634ca0f45b154905e51e to your computer and use it in GitHub Desktop.
Save ShakibHabibi/532d9810346c634ca0f45b154905e51e to your computer and use it in GitHub Desktop.
#include <stdio.h>
int main( int argc, char *argv[] ) {
if( argc == 2 ) {
printf("The argument supplied is %s\n", argv[1]);
}
else if( argc > 2 ) {
printf("Too many arguments supplied.\n");
}
else {
printf("One argument expected.\n");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment