Linux Core Designing

week 1

tips:

if you want to learn about the Linux,and find this article,please ensure that you realized this article is the summary from the my study.you can look this as a note,and get some confined knowledge,but if you want to study deeply,you should search for some public courses of some famous teachers.

What you don't realized about c:Point

Understanding Declarations

the following code seems uneasy to understand

c 复制代码
(*(void(*)())0)();

we can rewrite it like this:

c 复制代码
// define a function ptr
typedef void (*funcptr)();
// transform 0 to a function ptr we difined before forcely
// and call this function  
(* (funcptr) 0)();

Interview question of technology company

c 复制代码
void **(*d) (int &,char ** (*)(char *,char **));

the explain of front declare:

d is a pointer to a function that takes two parameters:

*1 a reference to an int and

*2 a function pointer that takes two parameters

** 2.1 a pointer to char

** 2.2 a pointer to pointer to char

Easy C Pointer

please look at this code:

c 复制代码
void main(){
	int a = 15;
	int b = 2;
	int c = 39;
}

if you coded &b maybe you want a reference,and you can called it address of too;

if you coded *&b,the affection just equal b, many body thought that * is a pointer,it's just approximate right,the absolute answer is value of;

相关推荐
chlk12320 小时前
Linux文件权限完全图解:读懂 ls -l 和 chmod 755 背后的秘密
linux·操作系统
舒一笑21 小时前
Ubuntu系统安装CodeX出现问题
linux·后端
改一下配置文件21 小时前
Ubuntu24.04安装NVIDIA驱动完整指南(含Secure Boot解决方案)
linux
深紫色的三北六号1 天前
Linux 服务器磁盘扩容与目录迁移:rsync + bind mount 实现服务无感迁移(无需修改配置)
linux·扩容·服务迁移
SudosuBash1 天前
[CS:APP 3e] 关于对 第 12 章 读/写者的一点思考和题解 (作业 12.19,12.20,12.21)
linux·并发·操作系统(os)
哈基咪怎么可能是AI2 天前
为什么我就想要「线性历史 + Signed Commits」GitHub 却把我当猴耍 🤬🎙️
linux·github
十日十行3 天前
Linux和window共享文件夹
linux
木心月转码ing3 天前
WSL+Cpp开发环境配置
linux
崔小汤呀4 天前
最全的docker安装笔记,包含CentOS和Ubuntu
linux·后端
何中应4 天前
vi编辑器使用
linux·后端·操作系统