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;

相关推荐
2501_927773079 分钟前
imx6驱动
linux·运维·服务器
hy____12325 分钟前
Linux_进程间通信
linux·运维·服务器
郭涤生44 分钟前
C++的函数是否可以做到完全覆盖Linux和windows的跨平台
linux·c++·windows
南宫码农1 小时前
神马影视8.5版本如意伪静态+视频教程
linux·运维·centos
坐怀不乱杯魂2 小时前
Linux网络 - 网络层
linux·服务器·网络
j_xxx404_2 小时前
Linux:命令行参数与环境变量
linux·运维·服务器
j_xxx404_2 小时前
Linux:进程虚拟地址空间|虚拟内存管理
linux·运维·服务器
江畔何人初2 小时前
pod的定义以及创建过程
linux·运维·云原生
德尔塔大雨淋2 小时前
VLLM 中的module PASS 和FUN PASS
linux·服务器·vllm
末日汐2 小时前
linux线程
linux·运维