当前位置:网站首页>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.
边栏推荐
猜你喜欢
STAHL touch screen repair all-in-one display screen ET-316-TX-TFT common faults
MySQL 中出现的字符编码错误 Incorrect string value: ‘\x\x\x\x‘ for column ‘x‘
【接口测试】JMeter调用JS文件实现RSA加密
Internet使用的网络协议是什么
网络安全与基础设施安全局(CISA):两国将在网络安全方面扩大合作
Postman 批量测试接口详细教程
2022年秋招,软件测试开发最全面试攻略,吃透16个技术栈
[Chinese tree tags - CTB]
移植MQTT源码到STM32F407开发板上
Graph adjacency matrix storage
随机推荐
C陷阱与缺陷 第7章 可移植性缺陷 7.6 内存位置0
Pytorch框架学习记录8——最大池化的使用
织梦发布文章提示body has not allow words错误
PyQt5 + MySQL5.8 【学生信息管理系统】【增删改查】
idea实用快捷键合集——持续更新
ahooks 是怎么处理 DOM 的?
软考 ----- UML设计与分析(上)
如何用Chrome编辑以及调试代码
位运算简介
JSD - 2204 - Knife4j framework - processing - Day07 response results
关于Request复用的那点破事儿。研究明白了,给你汇报一下。
Interview Blitz 70: What are sticky packs and half packs?How to deal with it?
win10版本1803无法升级1903系统如何解决
OSG笔记:设置DO_NOT_COMPUTE_NEAR_FAR,手动计算远近平面
网络安全与基础设施安全局(CISA):两国将在网络安全方面扩大合作
StringTable Detailed String Pool Performance Tuning String Concatenation
Taobao's API to get the list of shipping addresses
附录A printf、varargs与stdarg A.2 使用varargs.h来实现可变参数列表
Godaddy domain name resolution is slow and how to use DNSPod resolution to solve it
响应式织梦模板清洁服务类网站