Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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:

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Microsoft Visual Basic 2017 For Windows Web And Database Applications

Authors: Corinne Hoisington

1st Edition

1337102113, 978-1337102117

More Books

Students also viewed these Databases questions