| Hello World in C |
|
| programming |
This article describes how to write, compile and execute a "Hello World" program in C on Linux (Fedora).
1. the prerequisites
If it is not installed yet, you can install it with yum (you need to be root to do that):
2. write the code
now write the following code into the sourcefile: save the file and exit vi with ":wq + enter" explanationThis loads some definitions for basic I/O functions (used for the command "printf").
The main function ist where the execution of the program starts.
This prints out the string "Hello World!" and a "line break" (\n).
3. compile the codeThis produces an executable called "helloworld". 4. run the programyou can now execute the binary program with:
Comments (0)
Powered by !JoomlaComment 4.0 beta1
!joomlacomment 4.0 Copyright (C) 2009 Compojoom.com . All rights reserved." |


