Hello World ハローワールド

Objectives of this program 本プログラムの目的

This program displays Hello World.

このプログラムでは、ハローワールドを表示する。

Header ヘッダ

First, include a header file to use standard input/output.

まず、標準入出力を使うため、ヘッダファイルをインクルードする。

#include <stdio.h>

Main body of the program プログラム本体

Hello World is a simple program, so it only has a main function.

ハローワールドは簡単なプログラムなので、メイン関数だけである。

int
main(void)
{

This is where the heart of the program begins: outputting Hello World to the standard output. In the C language, strings are enclosed in "". The function puts sends the string to the standard output. At this time, a newline is also output at the end.

ここからが本プログラムの肝であるが、ハローワールドを標準出力に出力する。 C 言語では文字列を "" で括って表す。 puts というのが文字列を標準出力に送る関数である。この時、最後に改行も一緒に出力される。

   puts("hello, world");

Finally, the exit status is returned. This program always ends normally.

最後に、終了ステータスを返す。本プログラムは常に正常終了する。

   return 0;
}

This is the end of the Hello World program.

以上でハローワールドのプログラムは終わりである。