#include #include #include // Global variables are stored in data segment double result = 0; void print_table() { // Static variables are stored in data segment, not in stack segment static bool is_first_call = true; if ( is_first_call ) { printf("Table header\n"); is_first_call = false; } printf("Table contents\n"); } int main() { for ( int counter = 0; counter < 5; ++counter ) print_table(); return 0; }