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;

相关推荐
DevHub8 分钟前
电视盒子刷 Armbian 教程:30 元旧盒子变 NAS 跑 Docker,200+ 机型可刷
linux·嵌入式硬件·docker·容器·开源·电视盒子
Doraemomo2 小时前
Linux编程-线程
linux·运维·服务器
Linux-lucky8 小时前
21-Linux学习之旅之HTTPS和安全加固
linux·运维·学习·ubuntu·https
清水白石0089 小时前
Python 死锁排查全攻略:从线程卡死到锁依赖定位与工程化修复
linux·网络·python
ao-weilai10 小时前
Linux基础:Ext系列文件系统
linux·运维·服务器
qq_3494479511 小时前
Linux系统,安装git,从使用git下载仓库(GitHub, Gitee, GitLab 等),并且使用ssh密钥,可以直接执行git pull
linux·git·ssh
mCell14 小时前
GitHub Actions 玩法大赏:一台远程主机的七种活法
linux·github·agent
盐焗鹌鹑蛋14 小时前
【Linux】动静态库的制作与使用
linux
艾伦_耶格宇15 小时前
【ELK】-4 logstash的搭建及操作
linux·运维·ubuntu·elk