Answered step by step
Verified Expert Solution
Question
1 Approved Answer
kindly solve for ubuntu in c language Create 3 files - main.c - functions.c - header.h header.h file contains following function prototypes void sort(int array
kindly solve for ubuntu in c language
Create 3 files - main.c - functions.c - header.h header.h file contains following function prototypes void sort(int array [], bool order) void findHighest(int array[], int postion) void print(int array[]) functions.c file contains following 3 functions along with their logic void sort(int array[], bool order) \{ > sort in ascending order if order is true > sort in descending order if order is false void findHighest(int array[], int nth)\{ > find nth highest value if nth =2 find 2 nd highest value from the array \} In main.c you will accept command line arguments including 3 things - an array of integers - order of sort ( 1 for ascending order and 0 for descending order) - nth position to get the nth highest number from the array Use makefile to execute all these files. Your makefile will look like this. main: main.o functions.o gcc main.o functions.o -o main main.o: main.c gcc -c main.c functions.o: functions.c gcc -c functions.c clean: rm.0 mainStep 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