C language in Linux?

Status
Not open for further replies.

paragkalra

The Linux Man !
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

Commander in Chief
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

Wise Old Owl
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

Youngling
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

Wise Old Owl
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

left this forum longback
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

FooBar Guy
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

Wise Old Owl
Change void main() to main() or int main(), There`s is no conio.h ,graphics.h and a few more changes
 

QwertyManiac

Commander in Chief
If you use Dev C++ on windows rather than TC++ then there will be no problems switching :) (A few maybe... like FS etc...)
 

Yamaraj

The Lord of Death
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.
 
Status
Not open for further replies.
Top Bottom