Questions tagged [command-line-arguments]

The tag has no usage guidance.

6 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
0 votes
1 answer
23 views

Command-line validation key

I cannot figure out why am I getting these results? I'm currently only trying to validate the Numeric Key when typing 20x as a command-line argument get Usage: ./caesar Key #include <cs50.h> #...
0 votes
1 answer
14 views

Arguments of the main function

I have a question about these two different mini-programs: #include <cs50.h> #include <stdio.h> #include <string.h> #include <stdlib.h> #include <ctype.h> int main(void)...
  • 3
0 votes
1 answer
392 views

command line arguments help to use them in the program

I'm not sure how to include the input from the command-line arguement. I try to set the arguments equal to variables, bu it's not working. #include <stdio.h> #include <cs50.h> int main(...
0 votes
1 answer
389 views

CS50 PSET2 code will not compile

I would appreciate any help that could be given with my code below (+ error codes below that): My code will not compile and the primary error apparently is an "undeclared identifier" refering to ...
0 votes
0 answers
94 views

how to pass arguments to copy file program?

i am learning on study50 regarding file io. the exercise asks us to write a program to copy a file. I have written the code correctly for this program. I have named this cp.c and usage cp source ...
0 votes
1 answer
181 views

String validity check when string is command line argument?

We check the string validity when we use the get_string() function. Example: if (p != NULL) Are we also supposed to check string validity when the string is entered as a command line argument?