So there are three programs that I need to write. In addition, I need to include two files (as stated below) to store the functions and the output. I will only need the code for the first problem below and the code for the two files.you will need to create two additional les: header.h containing the declarations for the functions for all three problems and functions.c containing the denitions of the functions you will use for all three problems. Each of your three programs will start with #include “header.h” and will include main and no other functions. Each program will have to be compiled as: gcc file.c functions.cHere is a body of the header.h file that you will need to use:// This is your myHeader.h file, you can cut and paste (or copy) it.// Declarations for sortFile.cvoid sort(int array[], int length);// Declarations for statistics.cvoid lowercaseString(char string[]);void wordStats(FILE *fp, char string[]);void printFrequencies(FILE *fp);// Declarations for car-pol.cvoid car2pol(double x, double y, double *pr, double *ptheta);void pol2car(double r, double theta, double *px, double *py);—-And here is the body for the myfunctions.c that you need to write:// This is a skeleton for your myFunctions.c file// Functions for sortFile.cvoid sort(int array[], int length) ff enter body gg// Functions for statistics.cint letterFrequencies[26]; // Global array for wordStats, printFrequenciesvoid lowercaseString(char string[]) ff enter body ggvoid wordStats(FILE *fp, char string[]) ffenter body, use letterFrequencies[], use a static variable ggvoid printFrequencies(FILE *fp) ffenter body, use letterFrequencies[] gg// Functions for car-pol.cvoid car2pol(double x, double y, double *pr, double *ptheta) ff enter body ggvoid pol2car(double r, double theta, double *px, double *py) ff enter body gg—-First program:Write a program sortFile.c that takes as command line arguments an input lename, an output le name, and an optional third argument indicating the largest number of integers tosort.The program opens the input le consisting of at most 50 integers, sorts them in increasing order, andprints the sorted sequence to the output le. If the optional argument exists, let’s call it k, then if k issmaller than the number of integers in the input le, only the rst k integers in the input le will besorted and printed to the output le. You can assume that the input le exists and has the right format.(˜)$ more input115 -12 2 0-4 -3 1 2 0(˜)$ a.out input1 output1.1(˜)$ more output1.1-12 -4 -3 0 0 1 2 2 15(˜)$ a.out input1 output1.2 5(˜)$ more output1.2-12 -4 0 2 15(˜)$ more input220 10 20(˜)$ a.out input2 output2.1(˜)$ more output2.110 20 20(˜)$ a.out input2 output2.2 10(˜)$ more output2.210 20 20(˜)$ a.out input2 output2.3 0(˜)$ more output2.3(˜)$ more input3(˜)$ a.out input3 output3(˜)$ more output3(˜)$The program must call the following functions that you will dene in myFunctions.c. void sort(int array[], int length) – sorts the rst length elements of arrayin increasing order. For example, if array is ff7 3 1 2 9gg and length is 3, then sortwill modify array to ff1 3 7 2 9gg. You can assume that length will be at most the sizeof array.The le sortFile.c will consist of only just main dened and functioning as follows. int main(int argc, char *argv[]) – opens input le argv[1], calls sort to sortits elements, and prints the sorted elements in the output le argv[2]. If argv[3] exists, thenit is a an integer k. If k is smaller than the number of elements in the input le, then only the rstk elements will be sorted and printed in the output le.—-Please send me a message if you need help explaining anything. Thanks!




Why Choose Us

  • 100% non-plagiarized Papers
  • 24/7 /365 Service Available
  • Affordable Prices
  • Any Paper, Urgency, and Subject
  • Will complete your papers in 6 hours
  • On-time Delivery
  • Money-back and Privacy guarantees
  • Unlimited Amendments upon request
  • Satisfaction guarantee

How it Works

  • Click on the “Place Order” tab at the top menu or “Order Now” icon at the bottom and a new page will appear with an order form to be filled.
  • Fill in your paper’s requirements in the "PAPER DETAILS" section.
  • Fill in your paper’s academic level, deadline, and the required number of pages from the drop-down menus.
  • Click “CREATE ACCOUNT & SIGN IN” to enter your registration details and get an account with us for record-keeping and then, click on “PROCEED TO CHECKOUT” at the bottom of the page.
  • From there, the payment sections will show, follow the guided payment process and your order will be available for our writing team to work on it.