#include void print_bugs(){ printf("cockroach beetle worm\n"); } void print_bugs_two(){ printf("spider mite mantis\n"); } void print_bugs_three(){ printf("wasp hornet yellowjacket\n"); } long count_bugs(char* bugstring){ long spaces = 1; while(*bugstring){ if(*bugstring == ' ') spaces++; ++bugstring; } return spaces; } void call_other(void (*)()); long try_count_bugs(long (*)(char*)); void (* return_arg(void (*)()))(); void call_functions(void* start, size_t quantity); int main(){ void (*pb)() = print_bugs; pb(); printf("About to run call_other\n"); call_other(print_bugs); printf("Done runnign call_other\n"); long result = try_count_bugs(count_bugs); printf("Result = %ld\n", result); return_arg(return_arg(return_arg(print_bugs)))(); void *functions[] = {print_bugs, print_bugs_two, print_bugs_three}; printf("Testing call_functions\n"); call_functions(functions, 3); return 0; }