Jumat, 20 Februari 2009

C Programming on Ubuntu 8.04

How to Use C Programming on Ubuntu 8.04

1. check your gcc version: gcc --version
if the gcc is not installed yet, pliz install build-essential and gcc package

2. make .c file with editor text, you can use gedit or vim, for example
>vim test.c

#include
int main()
{
printf("welcome to c programming, enjoy it...:-) ");
return 0;
}

3. make gcc file to compile the program:
>vim maketest

test: test.c
gcc -o test test.c

4. do this command:
>make test
>./test

5. ====GOOD LUCK====

Tidak ada komentar: