How to build .exe from c

All,
I have never comipled C code before and would appricaite if anyone could tell me how to build a .exe from a C program.

Thanks in advance.

If you have C compiler (cc or gcc) installed, try

$ gcc file.c

This will create the binary, a.out, which you can execute by

$ ./a.out

Hi,
I do not have GCC; I am using CC and want to build .EXE not .O file.

Thanks,
Premjit

Where are you planning to execute it ? Windows or *nix ? a.out is the executable. It is not an object file.

I am using SunOS to complie it.

SunOS doesn't have ".exe". SunOS isn't Windows.

The above instructions should work, using cc instead of gcc. If they don't, please be more specific about what you are doing!