Introduction to C programming/Hello World
Jump to navigation
Jump to search
This page may qualify for speedy deletion because: Page is a stub. All useful document from this page has been merged to https://en.wikiversity.org/wiki/C_Programming/Introduction#A_Taste_of_C. This stub page is needed to be deleted to clean up the "C programming" course so that students won't be confused by various stub courses If you disagree or intend to fix it, and you have not contributed to it before, you may remove this notice. If you have contributed before and disagree, please explain why on the discussion page, after adding {{hangon}} to the top of the . This will alert curators and custodians to your intention, and may permit you the time to write your explanation. Before deleting check the discussion page, what links here, history (last edit), the page log, and Wikiversity:Deletions. |
If you have not installed the applications cited in the Software Needed section, please do so before moving on!
Hello World[edit | edit source]
The first application that almost every programmer begins with is the "Hello World" application. This is a very simple application that only prints a line of text to the terminal window. This lesson will demonstrate the basic principles and techniques that are used when designing more in-depth applications.
The process is simple: open your text editor, (emacs, Xcode, etc...) and type in the following text:
#include <stdio.h>
int main ()
{
printf("Hello World!\n");
return(0);
}
Next, save your text file as "hello.c" or something similar. It is very important that the file has the extension ".c" instead of anything like ".doc" or ".txt".
--Mashedmeat 04:37, 11 March 2009 (UTC)