DIGIT-ARC read-only archive · snapshot: July 23, 2026

C language in Linux?

10 posts · originally from https://geek.digit.in/community/threads/c-language-in-linux.30300/

paragkalra
paragkalra Original post #1
Jun 16, 2006 at 4:40 PM
I know C language.

Now i want to practise it out in Linux. Can any one tell what are the exact differences like compiling or how to include various header files etc?

Also are there any tutorials or any good book available on C under Linux?
QwertyManiac
Jun 16, 2006 at 5:06 PM
AFAIK the basic C (command line) is still the same. Write it . Save it. Locate the fle thro the terminal and type "gcc fn.c" to compile. You will get a .out file, this will be an executable.
deathvirus_me
Jun 16, 2006 at 5:24 PM
Well .. the programs are the exact same ... except the part where u accessed the system .. and the best part is that the C compiler is built into linux .. so u won't need any third party app ... throw in the console ... make the ".c" file ... i think u have to compile by using the command "gcc" .. donno .. forgot ... did it a long time ago ...
Satissh S
Jun 16, 2006 at 8:01 PM
u can use the,
gcc -o <fn_name> fn.c

to specify the name of the file say,
gcc -o shell_sort shellsort.c

AFAIK
Some headers such as conio.h aren't needed. Also call main function as int main() and return an integer. Others work alike.
JGuru
JGuru #5
Jun 17, 2006 at 11:18 AM
If you use Suse 10.1 or Mandriva Linux Or FC5 , you can install the full documentation for C/C++ with Help. Almost any Linux will have C/C++ libraries.
praka123
Jun 17, 2006 at 1:11 PM
I am also trying to learn C in Linux.I jus d/l a tutorial from
**www.learn-programming.za.net/learn_c_programming.html
and installed Anjuta IDE in my Ubuntu Dapper.now..Let's See
GNUrag
GNUrag #7
Jun 17, 2006 at 2:22 PM
Satissh S said:
Some headers such as conio.h aren't needed. Also call main function as int main() and return an integer. Others work alike.
Because conio.h is borland extensions for C language. Its not a part of ANSI C
vignesh
vignesh #8
Jun 17, 2006 at 2:23 PM
Change void main() to main() or int main(), There`s is no conio.h ,graphics.h and a few more changes
QwertyManiac
Jun 17, 2006 at 3:08 PM
If you use Dev C++ on windows rather than TC++ then there will be no problems switching :) (A few maybe... like FS etc...)
Yamaraj
Yamaraj #10
Jun 17, 2006 at 7:23 PM
GNUrag said:
Because conio.h is borland extensions for C language. Its not a part of ANSI C
A minor correction. The "Official C Standard" is now ISO C, not ANSI C.