c language in ubuntu 10.10
I have installed new ubuntu 10.10 in my lenovo laptop.I know gcc is used for c language but pls help me with detail info about running c in ubuntu.
thank you |
1. Install C (if it isn't already present).
Cut/paste this command: Quote:
Quote:
Code:
#include <stdio.h> Quote:
Quote:
|
Quote:
|
Thanks a lot my dears.
You are first to reply me and wise also. I tried the code but it does not work..uname is not found.Pls tell me from basic and explaining everything.also I have Gvim text editor so is it usefull in c programming? pls reply. |
uname is a std cmd: it's possible you used single quotes(') instead of backquotes (`).
you could try this format instead Code:
sudo apt-get install gcc g++ gdb make manpages-dev build-essential linux-headers-$(uname -r) |
Also you can select "synaptic Package Manager" through "System" menu and put gcc etc. in the search bar, the relevant packages will automatically get selected and then then...
http://www.ubuntugeek.com/synaptic-p...ntu-users.html Quote:
Vim is there by default. |
Gedit is great for all languages.
|
Hi Piyush ,
I think gcc comes preloaded with Ubuntu. Give 'which gcc ' so that you can ensure whether gcc is on place. If no gcc present you can install it using package manager or can download,compile&install. #include <stdio.h> main () { printf ("BOss My Generation from C \n"); } Suppose your filename is print.c,take a terminal Method I: YOu can compile with gcc print.c,generates a file a.out, to compile that give ./a.out in the directory where a.out is present. Method II: compile with gcc print.c -o output then run ./output instead of a.out in previous case. you can give whatever name instead of output,u like:cool: |
Quote:
|
What ever man pages we want,
we can install later using apt-get install ,so its not an issue i thnk so thnks to anisha |
Quote:
|
its right anisha, for apt a netconnection is required.
From my experience am saying without net its bored to work on linux. |
All times are GMT -5. The time now is 03:43 PM. |