Question
Need help writing this code:1. This program is to be written in C.2. You should write individual functions stored in separate files (one function per file) and each function should use an include statementfor your header file.3. You should use one appropriate header file for all your structures and for the prototypes of the functions you write4. You should not have any global variables in your header file. 5. You should use put all your .c’s and your headerfile myheader.h in a separate folderand shar those files together, $ shar -T *.c myheader.h >bigone6. You should use turnin , $ turnin bigone kmartin.cop3530.a7There will be deducts if any of the “rules ” 1-4 are not followed (no credit for a program written in Java); -25 for not using individual functions in individual files; -10 for not using a header file;and -25 for using global variables in your header file.I will run the program on Osprey using gcc :$ gcc *.c$ ./a.out myfile(note this is NOT redirection and it is MY choice as to the name of the data file, so use must program for a command line file name.) myfile will consist of the vertices (single letters) for a directed, unweighted graph.e.g. A B B C E X C D A C would indicate there are edges from A to B, B to C, E to X, C to D, andA to C.The array of vertices in this case would be [A,B,C,E,X D]but this would not be all the edges because you may assume that all of the vertices are reachable from the first vertex (A in this case).You should start your depth first and breadth first searches from the first vertex so that all the vertices are printed.Here are the functions your program should call with no prompts whatsover:a. Print the graph as adjacency lists (see Table 13.2). (If you get this properly foradjacency lists you earn an 85.)b. Call the depth first search. (5 more points.)c. Call the breadth first search. (5 more points.)d. Call the topological sort (you may assume there are no cycles–see pg. 654) (5 more points.)So you should have functions that build the adjacency lists, perform the depth first search, perform the breadth first search, and perform the topological sort. You MUST use adjacency lists to construct the graph,NOT a 2×2 array. Here are some structures that you might consider in your header file (foradjacency lists):/* Forward declaration */struct EDGETAG;typedef struct{ char c; bool isVisited; struct EDGETAG* p;} VERTEX;typedef struct EDGETAG{ VERTEX* v; struct EDGETAG* q;} EDGE;and then to test:int main(int argc, const char *argv[]){ EDGE* e = (EDGE*)malloc(sizeof(EDGE)); VERTEX* a = (VERTEX*)malloc(sizeof(VERTEX)); VERTEX* b = (VERTEX*)malloc(sizeof(VERTEX)); a->c = ‘A’; b->c = ‘B’; e->v = b; a->p = e; printf(“%c -> %cn”, a->c, a->p->v->c); return 0;}
GraduateWriterHelp.com is an online academic writing platform that provides extensive assistance to graduate school students as they work through their research projects, papers and dissertations. GraduateWriterHelp.com gives students access to experienced professionals who can provide the help they need in a timely and efficient manner. The service offers a wide range of services, including editing, proofreading, formatting, researching and more that can give students the confidence they need to write the perfect paper or dissertation for their chosen subject matter.
Services Offered by GraduateWriterHelp.com
GraduateWriterHelp.com offers a wealth of different services designed to make research projects easier for graduate school students. These include editing, proofreading, formatting and researching services, all tailored specifically for graduate-level studies such as PhDs or Master’s degrees in any field from business administration to engineering or even psychology – all with the aim of helping busy students find success in their academics without having to sacrifice other important commitments like family time or work hours towards earning a living wage outside of college hours.
The Benefits of Using GraduateWriterHelp.com
Using GraduateWriterHelp.com gives you access to experts from all over the world who are highly qualified and experienced in helping graduate-level students to complete successful projects in various fields quickly and efficiently – something that would otherwise be difficult, if not impossible, given tight deadlines associated with most Ph.D./Master’s degree programs today. Moreover, using this platform makes it easier for students to keep up with multiple research tasks simultaneously since there are so many different experts available on tap at any one time – no longer will you have to put off studying one topic while focusing on another because of lack of resources! Additionally, having access to professional editors, proofreaders, but also formatters means that quality control standards aren’t sacrificed when finishing major pieces – since these individuals understand what makes up good academic writing better than anyone else and can offer guidance on how best one should go about making improvements along those lines. Finally, there is also an added cost-saving benefit associated with utilizing Graduate Writer Help compared to hiring an independent contractor (which could potentially run into thousands depending on length/complexity).
This service allows users only pay for what students need, which tends to be much lower overall because customers pay per hour rather than project basis, thus resulting to greater financial flexibility, especially for those just starting out postgraduate studies looking to conserve some pennies here there whenever possible!
Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.
You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.
Read moreEach paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.
Read moreThanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.
Read moreYour email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems.
Read moreBy sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.
Read more