laitimes

Why is the first step to get started with programming be "Hello, World!"?

author:Attack on Grey

Hello, I'm EarlGrey, who insists on sharing dry goods, and has translated and published technical books such as "Python Programming Without Teachers" and "Python Parallel Computing Handbook".

If my sharing is helpful to you, please follow me and strike up together.

When learning to code, the first program is usually to output "Hello, World!", a tradition that dates back to the 1970s.

Why is the first step to get started with programming be "Hello, World!"?

1972 年,贝尔实验室的成员布莱恩·柯林汉在其撰写的内部技术文档《A Tutorial Introduction to the Language B》(B语言的教程介绍)中首次引入了 "Hello World" 这一字符串。

He wrote an example program in B to show how to use external variables:

main( ) {              extern a, b, c;              putchar(a); putchar(b); putchar(c); putchar('!*n');              }                  a 'hell';              b 'o, w';              c 'orld';           

This simple program is a signature starting point in computer programming education.

The code prints "hello, world" in the terminal, followed by a line break.

The code is split into multiple variables because each character constant in B can only store four ASCII characters.

By 1974, as C was gradually replacing B, Collingham wrote a "Hello World" program in C again in another Bell Labs internal memo, "Programming in C: A Tutorial," as a teaching example.

"Hello, world" program by Brian Collingham:

Why is the first step to get started with programming be "Hello, World!"?

This example was later inherited by him and Dennis Ritchie in their 1978 book The C Programming Language:

main( ) {               printf("hello, world\n");              }           

In the above code, the main( ) function defines where the program starts to execute, and its body consists of a statement, which is a call to the printf function, which means "print formatted". This function will cause the program output to pass anything to it as arguments, in this case the string hello, world.

Since then, "Hello, World!" has become a part of coding education and culture.

For many learning to program, this is the first program they write, marking the starting point of their entry into the world of programming.

"Hello, World!" is more than just a simple program, it carries the historical and cultural significance of programming education and is the first step for beginners to enter the world of programming.

各种语言 Hello World:

Why is the first step to get started with programming be "Hello, World!"?
Why is the first step to get started with programming be "Hello, World!"?
Why is the first step to get started with programming be "Hello, World!"?
Why is the first step to get started with programming be "Hello, World!"?
Why is the first step to get started with programming be "Hello, World!"?
Why is the first step to get started with programming be "Hello, World!"?
Why is the first step to get started with programming be "Hello, World!"?
Why is the first step to get started with programming be "Hello, World!"?
Why is the first step to get started with programming be "Hello, World!"?

Reference address: https://zh.wikipedia.org/wiki/Hello_World

-EDF-

I've seen this in the article, don't forget to click "like" and "watching" in the lower right corner to encourage~

Recommended Click on the title to jump

1. Python project engineering best practices

2. Python can be faster than C!

3. streamlit, a super powerful Python library

4. Douban's C++ classic with a score of 8.9 is free to give!

5. What changes have been made in Python 3.12?

Recently, I opened a Taobao store, called [Breaking Barriers], which focuses on the sharing of paid materials and tools related to program development to help you reduce trial and error and use costs. Everyone is welcome to pay attention.

Why is the first step to get started with programming be "Hello, World!"?

Reply to the keyword "pybook03", receive the electronic version of "Think Python 2e" translated by Attack Grey and his friends reply keyword "Book List 02", and receive the electronic version of 10 Python primers organized by Attack Grey

Tell you more details

Welcome to my circle of friends

👆 Update your thoughts and understandings every day

Read on