By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,369 Members | 950 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,369 IT Pros & Developers. It's quick & easy.

Command line arguments

P: 1
Write a professional C program that will print out all command line arguments that start with a '-'.

The program should also set a boolean variable to true if a command line argument is found that is equal to "-d" exactly, or to false if it is not found.

Finally, the program should then print out the value of that boolean variable.
Jun 17 '07 #1
Share this Question
Share on Google+
3 Replies


Savage
Expert 100+
P: 1,764
Write a professional C program that will print out all command line arguments that start with a '-'.

The program should also set a boolean variable to true if a command line argument is found that is equal to "-d" exactly, or to false if it is not found.

Finally, the program should then print out the value of that boolean variable.
Ok,so what have you tryed?

And please read posting guidelines, when you have time, they will help you to get answer to your questions a way more faster.


Savage
Jun 17 '07 #2

100+
P: 208
Write a professional C program that will print out all command line arguments that start with a '-'.

The program should also set a boolean variable to true if a command line argument is found that is equal to "-d" exactly, or to false if it is not found.

Finally, the program should then print out the value of that boolean variable.
I don't know any professional that would write this program :P
Jun 18 '07 #3

Savage
Expert 100+
P: 1,764
I don't know any professional that would write this program :P
LOL.

Savage
Jun 18 '07 #4

Post your reply

Sign in to post your reply or Sign up for a free account.