I can not run and compile c program in terminal

Asked by Ajay Kumar

I can not run and compile c program in terminal please tell me if i have to download any package if yes then which one. I need to run c program. My version is 10.10 nd i update my system regularly. Please reply

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu build-essential Edit question
Assignee:
No assignee Edit question
Solved by:
actionparsnip
Solved:
Last query:
Last reply:
Revision history for this message
arochester (arochester) said :
#1

Googled: ubuntu c

Top of list: "How to Install C and C++ Compilers in Ubuntu and testing your first C and C++ Program" - http://www.ubuntugeek.com/how-to-install-c-and-c-compilers-in-ubuntu-and-testing-your-first-c-and-c-program.html

Revision history for this message
Best actionparsnip (andrew-woodhead666) said :
#2

Install build-essential

You can compile with:
gcc filename

The default output filename is a.out which you can then execute with:
./a.out

Should be ok.

Revision history for this message
Ajay Kumar (ajaykumar8118) said :
#3

Still problem in terminal i could not able to write '#' for including stdio.h file for lang program. What i'll have to do

Revision history for this message
Ajay Kumar (ajaykumar8118) said :
#4

Still problem in terminal i could not able to write '#' for including stdio.h file for lang program. What i'll have to do

Revision history for this message
Ajay Kumar (ajaykumar8118) said :
#5

Thanks actionparsnip, that solved my question.