C Primer Plus读书笔记 ·1&2

#2019.7.11#

Chapter 1: Getting Started

Whence C?

Dennis Ritchie of Bell Labs created C in 1972 as he and Ken Thompson worked on designing the Unix operating system. C was created as a tool for working programmers, so it’s chief goal was to be a useful language.

Why C?

C’s many virtues:
①powerful control structures;
②fast;
③compact code-small programs;
④portable to other computers;

Design Features
Its design makes it natural for top-down planning, structured programming, and modular design.

Efficiency
C exhibits some of the fine control usually associated with an assembly language.

Portability
C is a portable language, which means that C programs written on one system can be run on other systems with little or no modification. Note, however, that the portions of a program written specifically to access particular hardware devices , such as a display monitor, or special features of an operating system, such as Windows 8 or OS X, typically are not portable.

Power and Flexibility
Most of the powerful, flexible Unix operating system was written in C.
Many compilers and interpreters for other languages --such as FORTRAN, Perl, Python, Pascal, LISP, Logo,and BASIC–have been written in C.

Programmer Oriented
C is less strict than, say, Pascal or even C++ in limiting what you can do. This flexibility is both a advantage and a danger.

Shortcomings
C gives you more freedom, but bit also puts more responsibility on you. As one computer preliterate once commented, the price of liberty is eternal vigilance.

Whither C?

C++ grafts object-oriented programming tools to the C language. C++ is nearly a superset of C, meaning that any C program is, or nearly is, a valid C++ program, too. By learning C, you also learn much of C++.

What Computers do?

How central processing unit(CPU) cooperate with random access memory(RAM) to run the machine language, which is a detailed, tedious, exacting task. High-level Computer Languages and Compilers
High-level languages-- such as C, Java, Pascal – describe actions in a more abstract form and aren’t ties to a particular CPU or instruction set.

#2019.7.12#

Language Standards

The First ANSI/ISO C Standard(C89/C90)(1989-1990)在这里插入图片描述
Guiding Principles of C89/C90The C99 Standard:
①Internationalization
②Correction of dificiencies
③ improvement of computational usefulnessC99 hasn’t been as well received and supported by vendors as C90 was.

The C11 Standard
The language was revised because there was a need to track new technologies.

Using C: Seven Steps
在这里插入图片描述
Commentary
The moral here is that you should develop the habit of planning before coding.

Programming Mechanics
basename. extension

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值