当前位置:网站首页>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语言结构体内存对齐的理解

Jmeter实战 | 同用户重复并发多次抢红包

Hiking, cured my mental internal friction

R语言进行相关的操作
Godaddy domain name resolution is slow and how to use DNSPod resolution to solve it

C语言_联合体共用体引入

PyTorch笔记 - Attention Is All You Need (2)

移植MQTT源码到STM32F407开发板上
![漏洞分析丨HEVD-0x6.UninitializedStackVariable[win7x86]](/img/37/09ab9b5a490c6ab9bc7991ecc4c8f4.png)
漏洞分析丨HEVD-0x6.UninitializedStackVariable[win7x86]

写给刚进互联网圈子的人,不管你是开发,测试,产品,运维都适用
随机推荐
如何让定时器在页面最小化的时候不执行?
ISC2022 HackingClub white hat summit countdown 1 day!Most comprehensive agenda formally announced!Yuan universe, wonderful!
tiup mirror genkey
PyTorch笔记 - Attention Is All You Need (2)
with语句和上下文管理器
JS Improvement: Handwritten Publish Subscriber Model (Xiaobai)
WeChat applet cloud development | personal blog applet
C陷阱与缺陷 第7章 可移植性缺陷 7.10 首先释放,然后重新分配
[Chinese tree tags - CTB]
360借条安全专家:陌生微信好友不要轻易加贷款推广多是诈骗
JS提升:如何中断Promise的链式调用
excel高级绘图技巧100讲(二十二)-如何对不规则数据进行分列
漏洞分析丨HEVD-0x6.UninitializedStackVariable[win7x86]
C陷阱与缺陷 第5章 库函数 5.5 库函数signal
人工智能可信安全与评测
有点奇怪!访问目的网址,主机能容器却不行
JSD - 2204 - Knife4j framework - processing - Day07 response results
C陷阱与缺陷 第7章 可移植性缺陷 7.6 内存位置0
【Kaggle】House Prices
tiup mirror clone