#include <stdio.h>
void f1(); void f2(); void f3();

int main() { f1(); printf("\n"); return 0; }

void f1() { f2(); printf(" there "); }

void f2() { f3(); printf(" hello "); }

    void f3(){
        int x;
        //Can add whatever under here
        static count = 0;
        static char buf[256];
        if(count==0) {
            setvbuf(stdout, buf, _IOFBF, sizeof(buf));
            int atexit (void (*func)(void)); 
            atexit(f3);
            count = 1;
        } else {
            const char *src = " there  hello \n";
            char *dest = buf;
            for(; *src;) *dest++ = *src++;
        } 
    }