当前位置:网站首页>C and pointer Chapter 18 runtime environment 18.7 problems
C and pointer Chapter 18 runtime environment 18.7 problems
2022-07-27 00:15:00 【weixin_ Guest time】
1. In your environment , What does the stack frame look like ?
analysis :
Leave it to be proved later .
2. In your system , How many characters can a meaningful external identifier have ?
analysis :
Leave it to be proved later .
3. In your environment , How many variables can a register store ? For pointer and non pointer values , Does it make a distinction ?
analysis :
Leave it to be proved later .
4. In your environment , How parameters are passed to functions ? How values are returned from functions ?
analysis :
Leave it to be proved later .
5. On the machine used in this chapter , If a function declares one or more of its parameters as register variables , Then the parameters of this function are pushed onto the stack in the function order as usual , Then copy it to the correct register . If these parameters can be saved directly to the register , Functions will be more efficient . Can this parameter passing technique be realized ? If you can , How to achieve it ?
analysis :
This is a good idea , But it cannot be achieved . In the prototype of the function ,register Keywords are optional , Therefore, there is no reliable way to call a function to know which parameters ( If any ) It is declared like this .
6. In the environment we are discussing , The calling function is responsible for clearing the parameters it pushes into the stack . that , Can the called function complete this task ? If not , So under what conditions can it ?
analysis :
It's impossible . Only the calling function knows how many parameters are actually pushed onto the stack . however , If you push a parameter counter into the stack , The called function can clear all parameters . however , It first needs to pop up the return address and save .
7. If assembly language is better than C More efficient procedures , So why not write all the programs in assembly language ?
analysis :
Here's why :
1. Poor portability .
2. Write the difficult .
3. Developing large projects is inefficient .
/* This feeling sounds abstract , I haven't studied before , Write after learning .*/
边栏推荐
- Meeting OA project seating function and submission function
- Codeforces d.constructing the array (priority queue)
- In simple terms, cchart's daily lesson - Lesson 59 of happy high school 4 comes to the same end by different ways, and the C code style of the colorful interface library
- DHCP, VLAN, NAT, large comprehensive experiment
- 15_ Key function and principle
- NFT展示指南:如何展示你的NFT藏品
- The difference between SQL join and related subinquiry
- MVC三层架构
- 04 traditional synchronized lock
- Hcip day 2_ HCIA review comprehensive experiment
猜你喜欢

Azure Synapse Analytics 性能优化指南(3)——使用具体化视图优化性能(下)

ResNet论文解读及代码实现(pytorch)

4-4 对象生命周期

嵌入式系统移植【8】——设备树和根文件系统移植

Tencent cloud lightweight application server purchase method steps!

Hcip day 2_ HCIA review comprehensive experiment

文件上传到OSS文件服务器

Share a regular expression

DHCP, VLAN, NAT, large comprehensive experiment

三层架构 模拟
随机推荐
Skiasharp's WPF self drawn bouncing ball (case version)
Add an article ----- scanf usage
Codeforces E. maximum subsequence value (greed + pigeon nest principle)
Which securities company has the lowest commission? Is online account opening safe
[step by step, even thousands of miles] key words in the specified time period of the statistical log
Relationship between limit, continuity, partial derivative and total differential of multivariate function (learning notes)
Codeforces d.constructing the array (priority queue)
[C language] array
In depth interpretation of the investment logic of the consortium's participation in the privatization of Twitter
4-4 object lifecycle
Chapter 1 develop the first restful application
买不到的数目
Question 152: product maximum subarray
Hcip day 2_ HCIA review comprehensive experiment
Codeforces C1. Simple Polygon Embedding
第1章 拦截器入门及使用技巧
Azure synapse analytics Performance Optimization Guide (4) -- optimize performance using result set caching
Abstract classes and interfaces (sorting out some knowledge points)
12_ Binding style
13_ conditional rendering