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;

相关推荐
nbsaas-boot4 分钟前
SQL Server 存储过程设计规范(事务与异常处理)
linux·数据库·设计规范
Jason_zhao_MR1 小时前
米尔RK3506核心板SDK重磅升级,解锁三核A7实时控制新架构
linux·嵌入式硬件·物联网·架构·嵌入式·嵌入式实时数据库
叮咚侠1 小时前
Ubuntu 24.04.3 LTS 中 vdb 的 UUID 永久挂载没有显示的磁盘的操作步骤
linux·运维·ubuntu·挂载磁盘
.小墨迹2 小时前
C++学习之std::move 的用法与优缺点分析
linux·开发语言·c++·学习·算法·ubuntu
风华同学2 小时前
【Linux驱动篇】LED驱动开发实验
linux·驱动开发·ubuntu
李斯维2 小时前
安装 WSL 最好的方式
linux·windows
张小九992 小时前
fpocket安装和使用教程
linux·机器学习·github
元气满满-樱2 小时前
Rewrite重写
linux·nginx
杰克崔2 小时前
进程内mmap锁相互干扰问题
linux·运维·服务器·车载系统
xlp666hub3 小时前
从零手写一个 printf 函数:变参宏与默认参数提升
linux