Before learning a programming language

Before learning a programming language, we must first find out "programming language" concept.

Very young, parents taught us to speak, but also to teach us how to understand what others are saying mean. After a long period of nurturing and self-learning, we should learn unconsciously to speak, while other children can understand the meaning of words, we began to pocket money for snacks and toys to parents to talk to their parents being bullied ......

we are talking about Chinese, "Chinese language", as long as we need to tell their parents, the parents will meet, we use "Chinese language" to control the parents, so that parents do what we love to do.

"Chinese language" has a fixed format, each character represented a different meaning, we must correct expression, parents to understand what we mean. Such as allowing parents to give us 10 yuan pocket money, we would say, "my mother gave me 10 bucks, I want to buy a car." If we say "$ 10 pocket money to my little car mother" or "my mother gave me one billion yuan, I want to buy F-22", the mother will feel strange, do not understand what we mean, or misunderstood, we blame .

We have to control others through a fixed format and a fixed vocabulary of "language" and let others do things for us. There are many languages, including Chinese, English, French, Korean and so on, although they are not the same vocabulary and format, but you can achieve the same goal, we can choose any language to control others.

Similarly, we can also be controlled by the "language" computer, let the computer do things for us, such a language called programming language ( Programming Language ) .

Programming language also has a fixed format and vocabulary, we have to go through the learning will be used to control a computer.

There are many programming language, commonly used C language , C ++ , the Java , C # , Python , PHP, JavaScript, Go language , Objective-C, Swift, assembler language, each language has its own good aspects, such as:
Programming language The main purpose
C/C++ C ++ was developed on the basis of the C language, C ++ contains all the contents of the C language, C language is a part of C ++, they are often mixed together, so collectively referred to as C / C ++. C / C ++ software development mainly for PC, Linux development, game development, microcontroller and embedded systems.
Java Java is a general-purpose language that can be used for website background development, Android development, PC software development in recent years has involved a large data field (thanks to the popular Hadoop framework).
C# C # is developed by Microsoft to counter the Java language is an implementation mechanism similar to Java, C # but apparently failed, mainly for the Windows platform software development, as well as a small amount of background development site.
Python Python is a general-purpose language used primarily in the field of system operation and maintenance, website background development, data analysis, artificial intelligence, cloud computing, strong momentum in recent years, growth is very fast.
PHP PHP is a special type of language primarily used to develop the site daemon.
JavaScript JavaScript was originally used only for site front-end development, and is the only language front-end development, not irreplaceable. In recent years, because of the prevalence of Node.js, JavaScript in the background to develop the site also occupies a place, and is growing rapidly.
Go Language Go language was published in 2009 by Google, a programming language, growing very rapidly, at home and abroad has been a large number of applications. Go language mainly for server-side programming for C / C ++, Java have formed no small challenge.
Objective-C
Swift
Swift and Objective-C can only be used for the development of Apple products, including Mac, MacBook, iPhone, iPad, iWatch and so on.
Assembly language Assembly language is the development of an early computer language, its efficiency is very high, but the development efficiency is very low, so common in application development using assembly language is not only in the efficiency and real-time demanding key assembly language module will consider, for example, the operating system kernel, drivers, instrumentation and industrial control.

Different programming languages ​​can be likened to the national language, in order to express the same meaning, may use different statements. For example, the expression "hello world" means:
  • Chinese: Hello World;
  • English: Hello World
  • 法语: Hello everyone

In programming languages, the same operation is also possible to use a different statement. For example, display "C language Chinese net" on the screen:
  • C Language: puts ( "C language Chinese network");
  • PHP: echo "C language Chinese net";
  • Java: System.out.println ( "C language Chinese network");

Programming language similar to human language, by the intuitive vocabulary composition, we can easily understand what it means, for example, in C language, we use  puts  the word to let the computer shows the text on the screen; puts are output string (the output string )abbreviation of.

Use puts display "C language Chinese net" on the screen:
puts ( "C language Chinese network");
We want to display the content on (" and ") between, and in the end to have ; . You have to write, this is a fixed format.

Summary: The programming language is used to control a series of instructions to the computer (the I nstruction ), it has a fixed format and vocabulary (different format programming language and vocabulary is not the same), must be observed, otherwise it will go wrong, we can not reach purpose.

C language (C Language) is a programming language, learning C language, mainly the study of its format and vocabulary. Here is the complete example of a C language, it will make the computer display "C language Chinese net" on the screen.

Some native format and vocabulary This example demonstrates the main C language, readers can not read do not have to get to the bottom, do not ask why this is so, we will gradually follow-up to explain to you.

#include <stdio.h> 
int main () { 
    the puts ( "Chinese network language C"); 
    return 0; 
}
These words have specific meanings, statements, organized in a specific format together, constitute the source code (Source Code) , also known as source code or Code (Code) .

So, C language source code provides for sure every word, the meaning of the statement, which also sets out how the organization together, this is the syntax (Syntax) . It said learning English with us "grammar" similar governing the specific words and sentences organized into can understand the language.

The process of writing the source code is called the program (Program) . Who worked as a programmer called programmer (Programmer) . Programmers also very humorous, fond of self-deprecating, often say that they work hard, low status, like the farmers as well, so that he is "code farmers", is to write the code of farmers. It was also self-deprecating called a "program ape."

Guess you like

Origin blog.csdn.net/wu694128/article/details/89521627