I\'m having trouble writing the headers.h and the main.c portion [//Your code he
ID: 3890733 • Letter: I
Question
I'm having trouble writing the headers.h and the main.c portion [//Your code here] :
These two files need a main() to run their functions insertionSort() and mergeSortWrapper(). Then all three C files need a header file to inform them of what the others have that they need, including Node.h which defines the data-structure. Please finish both the main.c and headers.h
insertionSort.c
mergeSort.c
C programming (20 Points):
These two files need a main() to run their functions insertionSort() and mergeSortWrapper(). Then all three C files need a header file to inform them of what the others have that they need, including Node.h which defines the data-structure. Please finish both the main.c and headers.h
Please make print() print the whole linked list.
For headers.h, not everything needs to be shared.main() needs insertionSort() and mergeSortWrapper()
Both insertionSort() and mergeSortWrapper() need print().
Otherwise, it is best not to share too much, kind of like keeping methods and members private in C++ and Java.
headers.h
Node.h
main.c
Sample Initial Output:
Explanation / Answer
Please write a header.h and just give the declaration of function do not write all implementation. In your main.c include header.h by using #include"header.h"
And define the function in main.c file before main function.
Void main()
{
Int choice;
Print...how do you want to sort...
Switch (choice)
{
case 1:
//Call insert ion sort function
Break;
case 2:
// Call merge sory function
break;
default:
Print...please enter valid choice
}
}
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.