How to develope programs in Ubuntu using C

Vincent Trouilliez vincent.trouilliez at modulonet.fr
Fri Apr 28 15:23:33 UTC 2006


On Fri, 2006-04-28 at 20:30 +0530, Sumesh K.S wrote:
> Hai
>       iam a novice programmer, i like to build some programs under
> ubuntu. How i develop programs under Ubuntu Using C.
> OS: Ununtu 5.10
> From
> Ununtu.


This should get you started (worked for me ;-) :

1) install the C compiler : "sudo apt-get install build-essential"

2) create a text file, call it say "main.c", and this in it:

#include <stdio.h>

main(void) 
{
printf("\n\nMy first program, woohoo !! :-)\n\n ");

}


3) save the file 

4) in the current directory (where you save that file), type: "gcc
main.c". 

This will compile the file and create an executable file called "a.out".

5) run the program: "./a.out"

6) enjoy :-)


--
Vince





More information about the ubuntu-users mailing list