Question: Your task is to implement functions a1(), a2(), a3() and provide one global variable g1 that is available to others. You are also given to

Your task is to implement functions a1(), a2(), a3() and provide one global variable g1 that is available to others. You are also given to provide macros Z1 and Z2 that are also available to others. When implementing a1() and a2() you decide the two must communicate through a helper global variable g2 (note that it should not be exposed to others) and you decided on a macro Z3.

In implementing a3() you noticed it was getting too long so you separated some of the code into a separate helper function a3a() called from a3(). Main is not your responsibility. Propose the architecture for what you are doing. Skip unnecessary details such as types, interfaces and bodies BUT show with exact names: all sources, all headers. For headers, add inclusion prevention. For all, use includes as needed.

Design the above using a structure similar to below:

Your task is to implement functions a1(), a2(), a3() and provide one

f1.c f2.c #inclure- me.h" //inclue system | #includeme.r #include wIme.h" | #include "f2.h" #include "f1.h" node t *f1int x; node.h main () ypedef struct node t p: void f2 (node t p) // something E2( p f1 ) f2 (p) x-1i node ti fl.h extern int x node t 1) void f2 (node_t)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!