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.

Recommended Answers

All 2 Replies

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.....................

Bips: how did you ever get the silly idea that you can run a program written 20+ years ago for MS-DOS on a *nix box??

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.