home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Microsoft Programmer's Library 1.3
/
Microsoft-Programers-Library-v1.3.iso
/
sampcode
/
qc_prog
/
chap09
/
showargs.c
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
C/C++ Source or Header
|
1988-04-06
|
449 b
|
23 lines
/* showargs.c -- shows how to access the arguments */
/* passed to main() */
#include <stdio.h> /* for NULL */
main(argc, argv)
int argc;
char *argv[];
{
int i;
printf("argc = %d\n", argc);
printf("\n");
for (i = 0; i < argc; ++i)
{
printf("argv[%d] -> \"%s\"\n", i, argv[i]);
}
printf("argv[%d] -> NULL\n", i);
printf("\n");
}