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;

相关推荐
mzhan01718 分钟前
Linux:intel:Cache Allocation tech
linux·cpu
学机械的鱼鱼38 分钟前
【踩坑记录】Linux环境下FreeCAD打开后一新建就崩
linux
小璐资源网1 小时前
UPS电源管理:应对突发断电的应急方案
linux·运维·服务器
grrrr_11 小时前
【工具类】虚拟机 + Ubuntu 安全部署 OpenClaw,联动 Ollama 零成本解锁云端大模型
linux·运维·ubuntu·#openclaw·#小龙虾
OKkankan1 小时前
深入理解linux进程
java·linux·c++
HABuo1 小时前
【linux线程(一)】线程概念、线程控制详细剖析
linux·运维·服务器·c语言·c++·ubuntu·centos
路溪非溪2 小时前
BLE的广播、扫描和连接等工作机制总结
linux·arm开发·驱动开发
我才是一卓2 小时前
linux 安装简易 git 服务端并使用
linux·运维·git
Wanliang Li2 小时前
AArch64虚拟化——virtio-mmio实现
linux·虚拟化·virtio·hypervisor·mmio
嵌入式-老费3 小时前
vivado hls的应用(第一个axi接口的ip)
linux·服务器·tcp/ip