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;

相关推荐
浪客灿心8 分钟前
Linux网络传输层协议
linux·运维·网络
舟遥遥娓飘飘36 分钟前
Nexus4CC 手机电脑同步claude code对话部署教程(基于linux系统)
linux·智能手机·电脑
何妨呀~1 小时前
Firewalld防火墙端口配置
linux
切糕师学AI1 小时前
Vim 深度解析:从经典 vi 到现代编辑器之巅
linux·vim·文本编辑器
计算机安禾1 小时前
【Linux从入门到精通】第49篇:服务器故障排查终极指南——思路决定出路
linux·运维·服务器
古月-一个C++方向的小白1 小时前
Linux——初识文件
linux·运维·服务器
北山有鸟2 小时前
编译香橙派内核
linux·运维·服务器
小此方2 小时前
Re:Linux系统篇(八)权限篇 ·三:深度解析从 umask 位运算到粘滞位的“权力锁”
linux·运维·服务器
晨曦夜月2 小时前
进程的五大状态及特殊进程解析
linux·服务器·算法
生而为虫2 小时前
Claude Code 最新版安装教程(Windows/Mac/Linux 全平台) 面向普通用户的 Claude Code 安装与模型接入指南
linux·windows·macos