当前位置:网站首页>C Expert Programming Chapter 1 C: Through the Fog of Time and Space 1.2 Early Experience of C Language
C Expert Programming Chapter 1 C: Through the Fog of Time and Space 1.2 Early Experience of C Language
2022-08-01 21:08:00 【weixin_Guest time】
1.2 Early experience of C language
Array subscripts start from 0 instead of 1.The valid range of a[100] is a[0]~a[99].
C语言的基本数据类型直接与底层硬件相对应。
The auto keyword is obviously a decoration.(only interesting to compiler designers who create symbol table entries) means: "automatically allocate memory when entering a program block" (as opposed to global static allocation or dynamic allocation on the heap) it is the default variable memory allocation mode.
Array names in expressions can be treated as pointers.
float is automatically expanded to double.Although this is no longer the case in ANSI.It has to do with the hardware representation of floating point numbers in PDP-11.First, in a PDP-11 or VAX, converting from float to double is very cheap, just add a word with each 0 bit after it.If you want to convert back, just remove the second word.Second, be aware that in some PDP-11 hardware representations of floating-point numbers there is an operation mode bit (mode bit), you can either only do float operations or only double operations, but if you want to do bothTo switch between the modes, you must modify this bit to change the operation mode.
Nested functions (functions that contain the definition of another function inside of them) are not allowed.
The register keyword.This keyword can give the compiler designer a clue that those variables in the program are hot and can be stored in registers.This design can be said to be a mistake.It is obviously better to let the compiler handle the allocation of registers automatically when each variable is used, than to keep such variables in registers for the lifetime of the declaration.
Complex Language Elements:
Generics and Tasks in Ada
String Handling in PL/I
Templates and Multiple Inheritance in C++
C has evolved from a usage tool to a heavily experimented and tested language.The first C compiler appeared around 1970.As time flies, the UNIX system as its foundation has been widely used, and the C language has also thrived.Its emphasis on low-level operations supported by hardware brought great efficiency and portability, which in turn helped UNIX achieve great success.
边栏推荐
- 关于Request复用的那点破事儿。研究明白了,给你汇报一下。
- Popular explanation: what is a clinical prediction model
- 附录A printf、varargs与stdarg A.1 printf函数族
- 织梦模板加入php代码
- C陷阱与缺陷 第7章 可移植性缺陷 7.8 随机数的大小
- 360借条安全专家:陌生微信好友不要轻易加贷款推广多是诈骗
- 1374. 生成每种字符都是奇数个的字符串 : 简单构造模拟题
- 软考 ----- UML设计与分析(上)
- C专家编程 序
- WeChat applet cloud development | personal blog applet
猜你喜欢
随机推荐
有点奇怪!访问目的网址,主机能容器却不行
【Kaggle】Classify Leaves
R语言 pca主成分分析的主要方法
Pytorch框架学习记录13——利用GPU训练
Based on FPGA in any number of bytes (single-byte or multibyte) serial port (UART) to send (including source engineering)
职场如象棋,测试/开发程序员如何突破成长瓶颈期?
进行交互或动画时如何选择Visibility, Display, and Opacity
C语言_联合体共用体引入
iptables的使用简单测试
测试开发人均年薪30w+?软件测试工程师如何进阶拿到高薪?
JS hoisting: how to break the chain of Promise calls
LeetCode·32.最长有效括号·栈·动态规划
记录第一次给开源项目提 PR
织梦模板加入php代码
Pytorch框架学习记录8——最大池化的使用
Pytorch框架学习记录9——非线性激活
[Chinese tree tags - CTB]
ISC2022 HackingClub white hat summit countdown 1 day!Most comprehensive agenda formally announced!Yuan universe, wonderful!
idea实用快捷键合集——持续更新
位运算简介









