当前位置:网站首页>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.
边栏推荐
- C陷阱与缺陷 第8章 建议与答案 8.1 建议
- C专家编程 前言
- JSD - 2204 - Knife4j framework - processing - Day07 response results
- MySQL 中出现的字符编码错误 Incorrect string value: ‘\x\x\x\x‘ for column ‘x‘
- C陷阱与缺陷 附录B Koenig和Moo夫妇访谈
- 织梦模板加入php代码
- Interview Blitz 70: What are sticky packs and half packs?How to deal with it?
- 2022牛客多校联赛第五场 题解
- kubernetes各名词缩写
- 移植MQTT源码到STM32F407开发板上
猜你喜欢
随机推荐
JS Improvement: Handwritten Publish Subscriber Model (Xiaobai)
移植MQTT源码到STM32F407开发板上
property语法
C Pitfalls and Defects Chapter 7 Portability Defects 7.11 An Example of a Portability Problem
位运算简介
C陷阱与缺陷 第8章 建议与答案 8.2 答案
封装一个管理 url 状态的 hook
和我一起写一个音乐播放器,听一首最伟大的作品
左旋氧氟沙星/载纳米雄黄磁性/As2O3磁性Fe3O4/三氧化二砷白蛋白纳米球
R语言 线性回归的有关方法
Imitation cattle forum project
织梦发布文章提示body has not allow words错误
C语言之字符串函数二
C专家编程 第1章 C:穿越时空的迷雾 1.1 C语言的史前阶段
C pitfalls and pitfalls Chapter 7. Portability pitfalls 7.10 Free first, then realloc
JS hoisting: how to break the chain of Promise calls
【Kaggle】Classify Leaves
Pytorch框架学习记录8——最大池化的使用
Graph adjacency matrix storage
tiup mirror merge









