Skip to content

Commit ab3d6af

Browse files
Add files via upload
1 parent 3c0f430 commit ab3d6af

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

CommandLineArgs/ARGS.C

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#include <stdio.h>
2+
#include <conio.h>
3+
4+
void main( int argc, char *argv[] ) {
5+
clrscr();
6+
if( argc == 2 )
7+
{
8+
printf("The argument supplied is %s\n", argv[1]);
9+
}
10+
else if( argc > 2 )
11+
{
12+
printf("Too many arguments supplied.\n");
13+
}
14+
else
15+
{
16+
printf("One argument expected.\n");
17+
}
18+
getch();
19+
}

0 commit comments

Comments
 (0)