I have 3 'c' files. "A.c" is main file, "B.c" is menu and "C.c" is clock file. In my case I want to show the time in main file and after I call to "C.c" it will work properly .And in menu file there is a menu item call view time. If I select that menu item application will crash. I did put some print's and try to detect in witch place the crash occur. It's time(NULL); method. If I call it on "A.c" it will work properly. But if I call it on "B.c" it will crash. I am new to c and I can't understand whats happening. What I want to do?