Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 06-28-2012, 08:29 AM   #1
LQ Newbie
Registered: Jun 2012
Posts: 1

Rep: Reputation: Disabled
c language installation

hi friends,
when i gave this in terminal
"sudo apt-get install build-essential"
all the required package is installed now please anyone tell me the steps to open c language?
are these steps enough? should i install some more packages?
i'll be much thank full for any help.
Old 06-28-2012, 09:17 AM   #2
LQ Newbie
Registered: Jun 2012
Location: Leiria, Portugal
Distribution: Kubuntu and Gentoo
Posts: 8

Rep: Reputation: Disabled
Hello friend.

Unlike Perl, Ruby, Lua, Python, etc... which are interpreted languages which right after install you get a interpreter which you can type your code in and gets executed on the go (or you can put it on a source file an change the execution permition ands gets executed), C is compiled language which means to start using it must first put some code in a source file and then call the compilers command to compile the source code into a executable and then you execut it.

Example : the classic hello world, put the code below inside a file por example c_program.c

#include <stdio.h>

int main (int argc, char **argv)
    printf ("Hello World\n");
    return 0;
and then open the terminal and issue this command :
$ gcc -o my_program c_program.c
$ ./my_program

I'm not trying to judge you but, it seems that its your first day in GNU/Linux Universe, first try to work with the shell, issuing some basics commands, and then try one of the scriting languages a mentioned at the beginning (or C if are brave enougth), there a tons of documents, tutotrial, howtos online for you study and learn, and folks here at LQ are always ready to help! Personaly I would recommend try to learn ruby, its a awesome language, it has a very nice syntax and best object oriented language I ever saw. But C is a great language too, actualy its my favourite programming language.

Visit this links

EDIT : Added the hello world snipet.

Last edited by pharaoh357; 06-28-2012 at 09:22 AM.
1 members found this post helpful.
Old 06-28-2012, 09:47 AM   #3
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,492

Rep: Reputation: 3639Reputation: 3639Reputation: 3639Reputation: 3639Reputation: 3639Reputation: 3639Reputation: 3639Reputation: 3639Reputation: 3639Reputation: 3639Reputation: 3639
.. And besides what's said in post #2: "sudo apt-get install build-essential"
is supposed to install the default c++ and c compiler
+ the packages / files required by the compilers :
g++, gcc, libc6-dev, linux-libc-dev, etc.
Examples, packages and file lists ( Ubuntu examples )



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Chinese language pack installation help shiokie Linux - Newbie 1 08-15-2010 09:19 AM
[SOLVED] KDevelop Language Installation almcneill Linux - Software 5 06-30-2010 08:17 PM
Want to add french language after installation maxy7710 Linux - Newbie 3 07-09-2009 02:53 AM
Adding language support after installation ?? waelaltaqi Linux - Software 0 12-08-2005 04:51 PM
adding language support after installation ? manub Red Hat 1 03-14-2004 10:53 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:48 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration