Need help reading a text file given in a command line argument, and storing its
ID: 3740569 • Letter: N
Question
Need help reading a text file given in a command line argument, and storing its words into a dynamically allocated array of pointers. The picture of the prompt better explains.
Note: This MUST be done in C not C+/++
Input Your program is to input two command line arguments: the first is the path and name of the dictionary file, dictionary, and the second is the path and name of the output file, output_ file, as given below. prog5 dictionary output_fi Spring 2018 ECE 2220 System Programming Concepts 2 of 3 Your program is to read in the contents of the dictionary provided into a dynamically allocated array of pointers to strings, e.g. char *Words [NUM_WORDS] so that the array requires the minimum amount of storage for each word.Explanation / Answer
here is the simple code that solves your problem #include int main(int argc, char **argv) { for (int x = 0; xRelated Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.