RE: Search. Yes, I found it about 1 minute after my post. I couldn't find it because it was right in front of me. Sigh!
My code:
=====================================
#include <stdio.h>
main(int argc, char *agrv){
int i;
printf("The value of argc is %d", argc);
printf("The first command-line arg is: %s\n", argv[0]);
for( i=1; i<argc; i++ ){
printf("\n %s", argv[i]);
}
return 0;
}
======================================
I compiled it with gcc -o argsc argsc.c
This gives me argsc
The online tutorial I was looking at says all I need to do in my terminal window is enter the name of my program and my arguments. For my example, it only prints what i enter at the command line - hopefully.
I enter:
John$ ./argsc Hello World
I think I should see:
argsc Hello World
Thoughts??
I appreciate the help.