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 13 1737
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
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 ?
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 ?
ThaDoctor <To*********@gmail.comwrote:
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.
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/
Go to the place where you "saved" the compiled file and write: ./<program>
That is: dotSLASH<program-name>
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.
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.
me********@aol.com 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 me********@aol.com 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"?
umteenth_out_of_topic_post {
Because the compiler as a default will create an executable
with name a.out (derived from "assembler output") in your
working directory. In Unix a single dot (.) is shorthand for
your working directory. So typing "./a.out" (without the quotes)
tells to the operating system to execute the file in the working
directory with name a.out Of course such a file will be created
only if the compilation completed without poblems.
If dot (.) appears in your PATH variable then you can simply type
a.out If you didn't understand the last sentence you can safely
ignore it.
}
Christopher Benson-Manica wrote:
ThaDoctor <To*********@gmail.comwrote:
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>
I don't think that a beginner will get much out of the gcc man page.
Bill Pursell 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.
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
There is a pitfall here in that if there's already a file with name
"hi",
then the compilation command will silently overwrite it.
Spiros Bousbouras sp****@gmail.com wrote:
me********@aol.com 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"?
umteenth_out_of_topic_post {
Because the compiler as a default will create an executable
with name a.out
But because it is a default, there is no reason to assume that
a new user would know that. If the syntax of the compiler forced
you to specify a destination file, such as "gcc hello.c a.out",
then it would follow that the user would know what the output
file is because he had to type it. When defaults are involved,
it does not follow that a user knows how to run the program
since he knew how to run the compiler.
(derived from "assembler output") in your
working directory. In Unix a single dot (.) is shorthand for
your working directory. So typing "./a.out" (without the quotes)
tells to the operating system to execute the file in the working
directory with name a.out
That wasn't what I was asking. I asked how does knowing how
to run the compiler without the leading "./" infer that one must
preceed a.out with "./"?
Of course such a file will be created
only if the compilation completed without poblems.
If dot (.) appears in your PATH variable then you can simply type
a.out If you didn't understand the last sentence you can safely
ignore it.
}
Christopher Benson-Manica wrote:
ThaDoctor <To*********@gmail.comwrote:
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>
I don't think that a beginner will get much out of the gcc man page.
Bill Pursell 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.
>
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
There is a pitfall here in that if there's already a file with name
"hi",
then the compilation command will silently overwrite it.
Spiros Bousbouras
On 27 Jul 2006 10:29:04 -0700, "me********@aol.com" <me********@aol.com>
wrote:
>That wasn't what I was asking. I asked how does knowing how to run the compiler without the leading "./" infer that one must preceed a.out with "./"?
This isn't a compiler issue, it's a matter of whether the current
directory is in the PATH variable. When I want a program to execute
without the leading "./", I move it to /usr/local/bin.
Clifford Stern ax***@lafn.org
Clifford Stern wrote:
On 27 Jul 2006 10:29:04 -0700, "me********@aol.com" <me********@aol.com>
wrote:
That wasn't what I was asking. I asked how does knowing how
to run the compiler without the leading "./" infer that one must
preceed a.out with "./"?
This isn't a compiler issue,
I didn't say it was.
it's a matter of whether the current
directory is in the PATH variable.
I didn't ask why it works the way it does.
When I want a program to execute
without the leading "./", I move it to /usr/local/bin.
No one asked what you want. The question was
"How does knowing how to run the compiler infer that
one knows how to run the program?"
Please try to keep up.
>
Clifford Stern ax***@lafn.org This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: cara_little |
last post by:
Good Morning,
I'm trying to get started with the Enterprise Library to evaluate it
and recommend to the rest of the developers in the company. However,
I'm having a heck of a time getting started...
|
by: Bibby |
last post by:
Hi, I'm interested in getting started in the programming world. I've dabbled
in C, C++ and VB6. Which would be the best language to focus my attention to
regarding the following considerations:
...
|
by: Peter Chant |
last post by:
I hope no one minds me running this past them.
I'm running a linux machine with with apache, php and mysql. This is not
accessable from the internet. I want a server that is visable to the...
|
by: tom c |
last post by:
In asp.net 2.0 I found this great list of getting started walkthroughs
that take you through what you need to know step by step.
http://msdn2.microsoft.com/en-us/library/ms186109.aspx
Now I...
|
by: pntkiran |
last post by:
i have on project in php. i want to run that project on linux machine.
so to execute that project which steps required.
is there any need to configure httpd.conf file if then tell me all...
| |
by: rocket1356 |
last post by:
Anyone know what component or where to get a tutorial on how to connect to a LINUX machine using a VB app?
I am trying to create a WIN32 Visual Basic application that communicates with a LINUX...
|
by: =?Utf-8?B?Q29kZVNsaW5nZXI=?= |
last post by:
I plan to build my own 2008 Server/Hyper-V system and will not be using one
of the tested Dell or HP systems from the release notes and could use some
pointers as to my assumnptions and answers to...
|
by: Banfa |
last post by:
So the title pretty much says it. I am attempting to switch to Linux but the printer attached to my machine must still be accessible by my wife who uses Windows.
Alternatively attaching the...
|
by: tvnaidu |
last post by:
I have Linux machine and windows machine on same network, I want to keep Linux machine as CVS server and windows machine as CVS client, can I keep like that?. My development machine is windows...
|
by: James Wright |
last post by:
Hi,
I am using oracle9i on Windows XP for my work. I have seen that sometimes oracle services(either listner or instance, sometimes both) are not getting started automatically on rebooting the...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The...
| |
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...
| |