473,748 Members | 2,847 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Getting started with C on my Linux machine.

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

Jul 26 '06 #1
13 1769
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
Jul 26 '06 #2

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 ?

Jul 26 '06 #3

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 ?

Jul 26 '06 #4
ThaDoctor <To*********@gm ail.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.progr ammer.
</ot>

--
C. Benson Manica | I *should* know what I'm talking about - if I
cbmanica(at)gma il.com | don't, I need to know. Flames welcome.
Jul 26 '06 #5

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/

Jul 26 '06 #6
cp
Go to the place where you "saved" the compiled file and write: ./<program>
That is: dotSLASH<progra m-name>
Jul 26 '06 #7
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 "programPathOrN ameAlongPath RETURN" Dollin
A rock is not a fact. A rock is a rock.

Jul 27 '06 #8

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 "programPathOrN ameAlongPath RETURN" Dollin
A rock is not a fact. A rock is a rock.
Jul 27 '06 #9
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

Jul 27 '06 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1529
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 and must be missing something. All of our development is completed in VB. I have installed Enterprise Library on my machine - however I can't compile the project. Is the code only available in C#? which means I have to have C# installed just to...
80
5274
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: Hireability Portability Flexibility The likely candidates seem to be Java, VB.Net, C, C++, C#.
0
1550
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 internet. For that purpose I am running a user mode linux machine and using apache on that as the external looking web server. This means that stuff I want to see on the outside is on a copy of apache that is doing little and does not get messed...
2
1165
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 have to go back and do a project in version 1.1 and I can not find a similar page that lists the walkthroughs in order that would teach my how to do things in the older version. Do you know of any such list?
4
1631
pntkiran
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 step required to run project with example. thanks in advance.
1
1813
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 machine. I will need to open and read some file info from the LINUX machine and display it in the application. If change is need I will write the change to the file. I cannot install SAMBA on the customer's computer. The LINUX server has an SSH...
1
4742
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 a few questions. Some getting started with Hyper-V assumptions. Please tell me if I am off base here. 1. Any recent Intel quad core processor has the needed x64 architecture with hardware assisted virtualization and data execution protection...
3
2187
Banfa
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 printer to my wife's machine and accessing a printer on a Windows machine from Linux machine would work for us to if that is possible and the first option isn't.
1
2161
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 machine, I want to do all check-in and check-out of all files from windows machine, but Linux as server, please let me know whether I can do like that?. appreciated.
1
1789
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 machine. Though the services can be started manually after the reboot. I want to check what has gone wrong at oracle end. I have checked the alert file but that does not contain any information regarding this issue. Can anyone suggest any log file...
0
8991
marktang
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9548
Oralloy
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9374
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9325
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8244
agi2029
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6076
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4876
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3315
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2787
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.