#include #include "counter.h" // create a new counter and initialize the count to 0 Counter *new_counter() { Counter *newCounter = (Counter *)malloc(sizeof(Counter)); newCounter->count = 0; return newCounter; } // return the counter's value int counter_get_value(Counter *counter) { return counter->count; } // increment and return the count int counter_increment(Counter *counter) { counter->count++; return counter->count; }