what i should do after installing "build essential" to write C programme?

Asked by adeelahmed

how i can write and compile the programmes of c- language ? any compiler of C - language for linux through which i can write and compile the programmes in the ubuntu????

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu yelp Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
arochester (arochester) said :
#1

Full Circle Magazine (free download) ran a series about programing in C. Look here: http://fullcirclemagazine.org/2008/09/26/issue-17-out-now/

Revision history for this message
shababhsiddique (shababhsiddique) said :
#2

you can use IDE like (codeblock)
for that install an IDE from add remove like codelite or codeblock (you may search by c++)

alternatively you can write code any using text editor gedit.

e.g: type

~$ gedit hello.cpp // a text editor shall open

//lets type the code
 #include<iostream>

using namespace std;

int main()
{
cout<<"hello world";
return 0;
}

//save and exit

//now compile

~$ g++ hello.cpp

//to execute

~$ /a.out

//hello world shall be printed

Revision history for this message
shababhsiddique (shababhsiddique) said :
#3

****correction*****

//to execute

~$ ./a.out

Can you help with this problem?

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

To post a message you must log in.