#include <stdio.h>
/**
* @param argc int how many words type in command line including
* app file. start from one.
* @param argv array of string how many words in the command line.
* start from app file as zero index.
*
* try by typing: lol.exe welcome to Americas
* the result would be:
* 0. lol.exe
* 1. welcome
* 2. to
* 3. Americas
*/
int main( int argc, char *argv[])
{
int i;
for( i=0; i<argc; i++)
printf("%d. %s\n", i, argv[i]);
return 0;
}
No comments:
Post a Comment