Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > Getting started with C on my Linux machine.

Reply
Thread Tools

Getting started with C on my Linux machine.

 
 
ThaDoctor
Guest
Posts: n/a
 
      07-26-2006
I would like to get started with programming in C, but I cant get it to
work, I do not need any compiler or such.
Only a basic explanation of the first program Hello World that print
"Hello World" on the screen.

Greetings Tobias

 
Reply With Quote
 
 
 
 
pete
Guest
Posts: n/a
 
      07-26-2006
ThaDoctor wrote:
>
> I would like to get started with programming in C,
> but I cant get it to
> work, I do not need any compiler or such.
> Only a basic explanation of the first program Hello World that print
> "Hello World" on the screen.


The whole point of the Hello World program,
is to gain enough familiarity with your C implementation
to write, translate, and execute a C program.

--
pete
 
Reply With Quote
 
 
 
 
ThaDoctor
Guest
Posts: n/a
 
      07-26-2006

pete skrev:

> ThaDoctor wrote:
> >
> > I would like to get started with programming in C,
> > but I cant get it to
> > work, I do not need any compiler or such.
> > Only a basic explanation of the first program Hello World that print
> > "Hello World" on the screen.

>
> The whole point of the Hello World program,
> is to gain enough familiarity with your C implementation
> to write, translate, and execute a C program.
>
> --
> pete


and after I have written and cmpiled how do I run the program under
linux ?

 
Reply With Quote
 
ThaDoctor
Guest
Posts: n/a
 
      07-26-2006

pete skrev:

> ThaDoctor wrote:
> >
> > I would like to get started with programming in C,
> > but I cant get it to
> > work, I do not need any compiler or such.
> > Only a basic explanation of the first program Hello World that print
> > "Hello World" on the screen.

>
> The whole point of the Hello World program,
> is to gain enough familiarity with your C implementation
> to write, translate, and execute a C program.
>
> --
> pete


And after this how do I run the program under linux ?

 
Reply With Quote
 
Christopher Benson-Manica
Guest
Posts: n/a
 
      07-26-2006
ThaDoctor <> wrote:

> and after I have written and cmpiled how do I run the program under
> linux ?


<ot>
Run a.out. man gcc for details, assuming that's your compiler.
Take further questions to comp.unix.programmer.
</ot>

--
C. Benson Manica | I *should* know what I'm talking about - if I
cbmanica(at)gmail.com | don't, I need to know. Flames welcome.
 
Reply With Quote
 
Bill Pursell
Guest
Posts: n/a
 
      07-26-2006

ThaDoctor wrote:
> pete skrev:
>
> > ThaDoctor wrote:
> > > I would like to get started with programming in C,
> > > but I cant get it to
> > > work, I do not need any compiler or such.
> > > Only a basic explanation of the first program Hello World that print
> > > "Hello World" on the screen.

> >
> > The whole point of the Hello World program,
> > is to gain enough familiarity with your C implementation
> > to write, translate, and execute a C program.

>
> and after I have written and cmpiled how do I run the program under
> linux ?


% gcc hello_world.c -o hi # compile the program
% ./hi # execute the program

In the above, '%' represents your command prompt.
Your questions are not really appropriate in this
newsgroup, but once you've figured out the basics
and have questions about the C language, those
questions will probably be topical. Make sure
to read the faq:

http://www.c-faq.com/

 
Reply With Quote
 
cp
Guest
Posts: n/a
 
      07-26-2006
Go to the place where you "saved" the compiled file and write: ./<program>
That is: dotSLASH<program-name>


 
Reply With Quote
 
Chris Dollin
Guest
Posts: n/a
 
      07-27-2006
ThaDoctor wrote:

>
> pete skrev:
>
>> ThaDoctor wrote:
>> >
>> > I would like to get started with programming in C,
>> > but I cant get it to
>> > work, I do not need any compiler or such.
>> > Only a basic explanation of the first program Hello World that print
>> > "Hello World" on the screen.

>>
>> The whole point of the Hello World program,
>> is to gain enough familiarity with your C implementation
>> to write, translate, and execute a C program.
>>
>> --
>> pete

>
> And after this how do I run the program under linux ?


The same way you run any other program in Linux, which, if
you ran the compiler, you presumably already know.

--
Chris "programPathOrNameAlongPath RETURN" Dollin
A rock is not a fact. A rock is a rock.

 
Reply With Quote
 
mensanator@aol.com
Guest
Posts: n/a
 
      07-27-2006

Chris Dollin wrote:
> ThaDoctor wrote:
>
> >
> > pete skrev:
> >
> >> ThaDoctor wrote:
> >> >
> >> > I would like to get started with programming in C,
> >> > but I cant get it to
> >> > work, I do not need any compiler or such.
> >> > Only a basic explanation of the first program Hello World that print
> >> > "Hello World" on the screen.
> >>
> >> The whole point of the Hello World program,
> >> is to gain enough familiarity with your C implementation
> >> to write, translate, and execute a C program.
> >>
> >> --
> >> pete

> >
> > And after this how do I run the program under linux ?

>
> The same way you run any other program in Linux, which, if
> you ran the compiler, you presumably already know.


How does it follow from running the compiler by invoking
"gcc hello.c" that one runs the program by typing "./a.out"?

>
> --
> Chris "programPathOrNameAlongPath RETURN" Dollin
> A rock is not a fact. A rock is a rock.


 
Reply With Quote
 
Chris Dollin
Guest
Posts: n/a
 
      07-27-2006
wrote:

>
> Chris Dollin wrote:
>> ThaDoctor wrote:
>>
>> >
>> > pete skrev:
>> >
>> >> ThaDoctor wrote:
>> >> >
>> >> > I would like to get started with programming in C,
>> >> > but I cant get it to
>> >> > work, I do not need any compiler or such.
>> >> > Only a basic explanation of the first program Hello World that print
>> >> > "Hello World" on the screen.
>> >>
>> >> The whole point of the Hello World program,
>> >> is to gain enough familiarity with your C implementation
>> >> to write, translate, and execute a C program.
>> >>
>> >> --
>> >> pete
>> >
>> > And after this how do I run the program under linux ?

>>
>> The same way you run any other program in Linux, which, if
>> you ran the compiler, you presumably already know.

>
> How does it follow from running the compiler by invoking
> "gcc hello.c" that one runs the program by typing "./a.out"?


Because in both cases -- more than both, since the OP presumably
knows more Linux commands than just `gcc` -- one types an
abbreviated version of the program's name.

The /real/ answer to the OPs question is, I suppose, "Usenet
is not, and is not intended to be, a substitute for an
actual person bootstrapping you."

--
Chris "finder" Dollin
"The path to the web becomes deeper and wider" - October Project

 
Reply With Quote
 
 
 
Reply

Thread Tools

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Is Netscape Leaving Firefox Behind on GNU/Linux? THE LINUX PROPAGANDA MACHINE CONTINUES. FIREFOX IGNORING LINUX............. traci.manicotti@gmail.com Computer Support 2 10-20-2007 02:12 PM
Linux... yeah linux.. Linux Have a nice cup of pee NZ Computing 19 04-17-2006 10:16 AM
if a variable is started inside a closure, can it ever be redeclared and started over, outside of the original function? Jake Barnes Javascript 2 02-15-2006 03:32 AM
[LINUX]Encoding problem when my application is started at boot fcurvat@gmail.com Java 5 10-25-2005 12:07 PM
DocBook getting started (with xmlto in Redhat Linux) Dr. Laurence Leff XML 3 08-17-2003 10:04 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57