main( int argc, char** argv )
| |
| |
| +----pointer to supplied arguments
+--no. of arguments given at command line (including executable name)
Example :
display_image image1.jpg
Here,
argc will be 2
argv[0] points to display_image
argv[1] points to image1
if(argc !=2 )
^^ Checks whether no. of supplied argument is not exactly two