ubuntu compilation of c program

Asked by Avani Patel

I have been trying to compile a simple hello program using C in Ubuntu 11.10 ,but i am not able to compile . Can please somebody help me? I am very new to this environment.

Question information

English Edit question
Ubuntu gcc-defaults Edit question
No assignee Edit question
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :

If you install build-essential you wil get an ANSI standard C and C++ compiler.

Revision history for this message
Mark Rijckenberg (markrijckenberg) said :



You can use the following source code (save file as hello.c) :

#include <stdio.h>

int main(void)
  printf("Hello world\n");
  return 0;

Revision history for this message
Enrico Rosina (e-rosina) said :


One more hint: At your place I would also consider installing an IDE.
I personally have NetBeans, and though I don't like too much their last strategic curve,
they have c/c++ imbedded. There is one NetBeans version in Ubuntu Software center,
and you can find two more recent versions of it at http://netbeans.org/

Hope this helps.

Can you help with this problem?

Provide an answer of your own, or ask Avani Patel for more information if necessary.

To post a message you must log in.