Getting Started in UNIX - incorporating C coding

I'm just starting a 'serious' coding in UNIX, so what I need is to run a C code on UNIX, What do I have to install (app) prior to coding/running the code and how do I compile that code?
can I write my c code in UNIX or I need to have a visual studio for this?

You need to install a C/C++ compiler and headers plus library objects for it. Which compiler and how to install it really depends on your system -- OSX? AIX? BSD? Solaris? IRIX? HPUX? SCO? If Linux, what distro of Linux?

Anyway... Once installed, most UNIX C compilers are used the same way, though they may have different extensions. They can compile .c source files into .o object files with:

cc file.c -o file.o

..and can link one or several object files into a single executable file with:

cc file.o a.o b.o c.o -o executable_file

...which will run as a normal program, just ./executable_name.

actually I'm not quite familiar with UNIX systems ( OSX? AIX? BSD? Solaris? IRIX? HPUX? SCO), I'm using putty.

Putty is not UNIX, the same way your monitor is not your computer. Putty's a terminal emulator you use to talk to UNIX on some other computer. And we really do need to know what your system is to help you; they provide similar environments, but are managed very differently.

Since you have a shell login, try 'uname -a' and see what that prints.

here u go

SunOS omicron 5.8 Generic_117350-61 sun4u sparc SUNW,Sun-Fire-480R

any help with this?

Sorry, I somehow didn't see this.

I don't know how much about SunOS, I'd suggest having this thread moved to the Sun section where you'll more likely encounter posters that do. I do think Sun has their own proprietary compilers, for one thing, though gcc should be available as well.

You need the SUNW developer packages installed (you can check it with pkginfo). If you have them you can download and install the GNU gcc compiler downloading it from sunfreeware.

Note that the SUNW developer packages conatins the system headers, and the Sun assembler and loader wich are needed by the GCC to work, so if you do not have those packages intalled gcc will not work.