March 19th, 2013, 03:13 PM
BTW, I have taken the time out of my busy work schedule to convert your unreadable mess into a code listing. In that readable form, your problem is immediately apparent. However, we must wait until you have presented us with a readable form of your program before I can inform you of what I had found. So do please hurry up and correct your post so that you won't waste any more time.
In the meantime, here is what my compiler (MinGW gcc) thought of your code:
| C:TEST>gcc -Wall pelajar.c |
pelajar.c:17: warning: parameter names (without types) in function declaration
pelajar.c: In function `main':
pelajar.c:29: warning: control reaches end of non-void function
pelajar.c: At top level:
pelajar.c:50: parse error before `list'
pelajar.c: In function `list_func':
pelajar.c:52: `list' undeclared (first use in this function)
pelajar.c:52: (Each undeclared identifier is reported only once
pelajar.c:52: for each function it appears in.)
Do not ignore the warnings. Never ignore warnings. Warnings can be far more important than error messages.
"pelajar.c:29: warning: control reaches end of non-void function" means that you left out the return statement at the end of main. Return zero for normal operation and non-zero if the program encountered a problem (eg, it failed to open a file, it was given the wrong command-line arguments). Most of the time for such simple programs you would always just return zero.