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;

相关推荐
Better Bench3 小时前
WSL2 Ubuntu 中 Claude CLI “command not found” 故障排查与修复
linux·ubuntu·claude·wsl·claudecode
实心儿儿4 小时前
Linux —— 进程间关系和守护进程
linux·运维·服务器
Dawn-bit5 小时前
Linux磁盘管理详解
linux·运维·服务器·计算机网络·云计算
RisunJan6 小时前
Linux命令-sftp(SSH 文件传输协议客户端)
linux·运维
龙仔7258 小时前
人大金仓OS_Core数据库自动备份实施笔记(银河麒麟Linux)
linux·数据库·笔记·备份·人大金仓
老杨聊技术8 小时前
CentOS 7 安装 MySQL 8 保姆级教程
linux·mysql·centos
xiaoye-duck9 小时前
《Linux系统编程》Linux 系统多线程(六):<线程同步与互斥>线程同步(下):POSIX 信号量与环形队列生产者消费者模型详解
linux·线程
三言老师9 小时前
CentOS7.9:Redis‑Cluster集群部署结构化实战教程
linux·运维·服务器·数据库
大鱼>11 小时前
eBPF内核编程:从TC到XDP的全栈可观测性
linux·服务器·php
sxstj11 小时前
老旧电脑 Linux 系统完整推荐(按内存分档,新手友好)
linux