C语言第一节

这篇文章首发自我的微信公众号(Mark学编程),特此说明。
测试感觉OK了,这个公众号可以开始工作了,当然,关注的人太少,需要积极推广。
从今天开始,基本上每天会有编程的内容发布,初步打算是C语言开始,后面有Python, 然后可能是Php或Java等。欢迎读者反馈,便于安排。
C语言的学习主要是以双语版的《C程序设计》一书为主要读本,配合两本辅助的读物,一本叫做《明解C语言》看上去是很好的读物,一本是大学教材《C程序设计》,谭浩强编写的。用的编译软件是在WIN10上面使用的DEV-C++,当然,读者可以用自己喜欢的编译软件。顺便说一句,安装编译环境是第一个考验,不要气馁,有问题,可以参考网上资料,或者反馈作公众号,一定会得到好的解决。

下面我用英语,主要是从双语版改写而来,简单介绍C语言。
The C programming language was developed in1972 in USA. You know The US is the super power country which also is the leading country in the Computer Science. The American National Standard Institute (ANSI) developed the first standardised specification for the language. namely C89. And now we know we  use the C99, which was further revised in 1999 based on the previous one.
Why C language? There are a lot of reasons. In the book the author list 6 advantages of it. i.e: A: Portable which means C can run on different computer system. B: It is a structured language. C: efficient which means runs fast. D: flexible the author list a lot which suggest the C can do a bunch of jobs. E: powerful. It can manipulate the computer memory for example.  and F: C is concise. OK, that is the point of view in the author's mind. Anyway, as far as I know. C is the starting point for the programmers to start with. And I also think it is a fundamental for people to begin his/her understanding of the program.

Let's start to write a simple program which say hello to verery body. And before that, I would like to to remind you that the 7 steps of the running the C program.

Step 1: Define the problem(task). Here we will run a program which can print “Hello Everyone”.

Step 2: Design algorithm to solve the problem( to carry on the task). print a phrase is easy in the C. We just use "printf" function.

Step 3: Design the program. again we use printf function.

Step 4: Write the code. We call the output of our writing code "Source File"

Step 5: Compile the source file. The outcome we name it object file.

Step 6: Link the object file. the executable file generated.

Step 7: Run the executable file. Finnaly the result. 

I will paste the code in my Dev-C++ in the below and will show you how the steps going on.

猜你喜欢

转载自blog.csdn.net/Mark21577/article/details/85235429