clrscr is declared in conio.h and thats not included. Anyways whats the problem?? clrscr is not standard function, probably thats why you are not able to compile. (If compilations is the problem :^) )
In addition, you declared your main() function without specifying a return type (which, I believe, will default to void main(), a bad practice in itself), but try to return 1 at the end. Also, returning 1 to main() indicates that there was an error in the program - but your program, if it makes it to the return statement, should have executed perfectly fine.
In addition, you declared your main() function without specifying a return type (which, I believe, will default to void main(), a bad practice in itself)
It's not allowed anymore; in the C89 Standard no return type defaulted to an
int return type (just as in the good old K&R1 version of C). The C99 Standard
just doesn't allow this anymore. A lot of current compilers still default a lack
of a return type to int though for 'convenience' reasons.
Comment