Your missionMake counter.h safe to include more than once, then implement the three functions it declares.See it in actioncounter c = { 7 }; counter_add(&c, 5); counter_value(&c)12counter c = { 7 }; counter_reset(&c); counter_value(&c)0Your checklistWrite counter.h and counter.c.Keep the counter type and the three function signatures from the starter.Protect the whole header with an include guard. Grademe includes it twice in the same source file.counter_reset stores zero in the counter.counter_add adds amount to the current value. Negative amounts are valid.counter_value returns the current value without modifying the counter.Do not use global or static storage. Two counter values must remain independent.ConstraintsExpected filescounter.hcounter.cAllowed functionsNone. Write every helper yourself.
Your missionMake counter.h safe to include more than once, then implement the three functions it declares.See it in actioncounter c = { 7 }; counter_add(&c, 5); counter_value(&c)12counter c = { 7 }; counter_reset(&c); counter_value(&c)0Your checklistWrite counter.h and counter.c.Keep the counter type and the three function signatures from the starter.Protect the whole header with an include guard. Grademe includes it twice in the same source file.counter_reset stores zero in the counter.counter_add adds amount to the current value. Negative amounts are valid.counter_value returns the current value without modifying the counter.Do not use global or static storage. Two counter values must remain independent.ConstraintsExpected filescounter.hcounter.cAllowed functionsNone. Write every helper yourself.