Shared Tutorials
Tutorials Shared by the Internet Community
Advertisements
| Top Tutorials | New Tutorials | Submit | Login | Register |
Tutorial Basic Detail
Command Line Arguments
So here is four short programs that simply output these arguments.http://corymathews.com/index.php?p=21
Total Hits: 2237
Total Votes: 37 votes
Average Rating: 2.57 out of 5
Category: C and C++/General Development
Description:
Recently in a couple class projects I have needed to use command line arguments, and the first time dealing with these can be a little confusing. So here is four short programs that simply output these arguments.What I mean by this is that I need to accept a string while I am calling the program name. For example I am running my program called printString and I want it to display the text hello. So I run it like so
./printString.c hello
Rating Detail
| Stars | Percentage | Total Vote |
|---|---|---|
![]() |
![]() ![]() 16.22% |
6 |
![]() ![]() |
![]() ![]() 16.22% |
6 |
![]() ![]() ![]() |
![]() ![]() 16.22% |
6 |
![]() ![]() ![]() ![]() |
![]() ![]() 16.22% |
6 |
![]() ![]() ![]() ![]() ![]() |
![]() ![]() 18.92% |
7 |




16.22%

16.22%

16.22%

16.22%

18.92%