Question
Project Linux C Program gcc Read in command line arguments Task: Read in command line arguments after file.c and execute the correct task file.c should
Project
-
Linux C Program gcc
-
Read in command line arguments
-
Task: Read in command line arguments after file.c and execute the correct task
-
file.c should have two variables ints from input x and xx
-
These variables will be filled through command line arguments
-
ex: file.c -a should print out hello world
-
ex: file.c [-a][-b x][-c xx] file2
-a prints Hello World
-b x takes in number to variable (x is number from input) default is 10
-c xx takes in larger number to variable(xx is number from input) default is 50
File2 is an input file containing one number per line
example:
1
2
8
Important - Use stderr an perror if other than above is inputted
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started