0

Hi,

I hav heard that it isn't that simple to write a program in linux using c.
Lots of commands n stuff.Please simplify what actually I've got to do to run turbo c++ in my linux laptop as I am a beginner.

3
Contributors
2
Replies
5
Views
8 Years
Discussion Span
Last Post by Ancient Dragon
0

Hi,

I hav heard that it isn't that simple to write a program in linux using c.
Lots of commands n stuff.Please simplify what actually I've got to do to run turbo c++ in my linux laptop as I am a beginner.

I guess U will change your opinion once u start doing programming in Linux.

Linux comes with C compiler by default and u don't need to install any.
Write your source code using any editor u have. Store it with an extension .c.
Now open a terminal. Use the cc command to compile your file as:
$cc <filename.c>
/////that will produce a out file called a.out which is the executable.
to execute that file do:
$./a.out

If u want to specify the executable name then do:
$cc -o <executable name> <filename.c>
e.g.: cc -o test test.c
execute using ./test


U Just need to explore a bit.....................

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.