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;

相关推荐
2301_780943848 分钟前
linux 对文件打补丁(Patch)
linux·运维·服务器
敬往事一杯酒哈18 分钟前
Ubuntu 20.04 安装Anacada
linux·运维·ubuntu
Lam㊣21 分钟前
服务器端口转发的方法
linux·服务器
zxnbmk22 分钟前
【7】Kubernetes存储(本章知识密度较高,仅浅浅了解后续详解)
linux·云原生·容器·kubernetes
ChangYan.22 分钟前
Windows命令行(cmd)下快速查找文件路径(类似Linux下find命令)
linux·运维·服务器
Hey小孩38 分钟前
[个人总结] LDD3:3.字符驱动 - scull(4)
linux·驱动开发
陈让然38 分钟前
VS Code新版本无法连接WSL ubuntu18.04
linux·运维·ubuntu
oMcLin41 分钟前
如何在Oracle Linux 8.4上通过配置Oracle RAC集群,确保企业级数据库的高可用性与负载均衡?
linux·数据库·oracle
小杰帅气43 分钟前
神秘的环境变量和进程地址空间
linux·运维·服务器
Vect__43 分钟前
基于CSAPP对链接和库的理解
linux