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;

相关推荐
暮云星影17 小时前
全志linux开发屏幕适配(一)屏幕参数设置说明
linux·arm开发
swordbob18 小时前
NIO 的 Channel 里有多个 BIO 吗?
linux·网络·nio
Fcy64818 小时前
Linux下 信号的保存与捕捉
linux·中断·信号的捕捉·信号的保存
A_humble_scholar19 小时前
Linux(九) 进程管理完全指南:从入门到实战
linux·运维·chrome
江华森19 小时前
Linux 操作命令完全指南
linux·运维
rjszcb20 小时前
Linux,sensor调试笔记1,修改帧率,以及曝光上不去问题
linux
C++ 老炮儿的技术栈20 小时前
Ubuntu root账号自动登陆
linux·运维·服务器·c语言·c++·ubuntu·visual studio
2301_7807896620 小时前
零信任架构中,身份感知防火墙(IAFW)的部署要点与最佳实践
linux·运维·服务器·人工智能·tcp/ip·架构
小狮子&21 小时前
ubuntu2604无法共享文件夹问题解决
linux·运维·服务器
biter down21 小时前
3:VMware Workstation 安装 Ubuntu 22.04 超详细教程
linux·运维·ubuntu