Check the command line input : Command Line Parameters « Development « C / ANSI-C






Check the command line input


#include <stdio.h>

int main(int argc, char *argv) {
  if ( argc > 1 ) 
     printf ( "You have initiated execution with arguments.");
}



           
       








Related examples in the same category

1.Parse Arguements
2.A program to list the command line arguments
3.Check the command line parameters
4.Process the command line input
5.Verify the user input and display file content
6.Command line parameter: display all of them
7.Use the command line parameter
8.Check the command line parameter and use it
9.Check the command line parameter: if less than required exit