当前位置:网站首页>Common interview questions
Common interview questions
2022-06-09 05:18:00 【wolf_ break】
remarks
You can also refer to the articles on arrays and functions
Array :https://blog.csdn.net/wolf_break/article/details/78320138
function :https://blog.csdn.net/wolf_break/article/details/78320460
Pointer subtraction
Pointers of the same type can be mutually subtracted
int a[] = {
2,4,5};
int *p = a;
int *q = &a[2];
cout << a[q-p]; //5
//q-p Namely q Inside address minus p Inside address , Besides sizeof(int), The result is 2A function pointer

Classical problems :
One has 10 An array of pointers , The pointer points to a function , This function has one int Parameters , return int type .
answer :
int (*p[10])(int)
The pointer of the pointer
example 1:
char *str[] ={
"123","6","432432"};
char **p = str;
cout << *p << endl; //6边栏推荐
猜你喜欢

Good hazelnut comes from Liaoyang!

Talk about 10 tips to ensure thread safety

Cmdbuilding搭建简易流程及问题处理

In 2022, the database audit manufacturer will choose cloud housekeeper! Powerful!

Test question bank and online simulation test for operation certificate of main principals of hazardous chemical business units in 2022

Practice and some ideas on the transformation of sonarlint code specification

FPGA based TDC Research Report

Lighting - brightness attenuation of light

Youshimu V8 projector opens the "vision" field of high fresh

Three paradigms of database
随机推荐
MQ message loss, message consistency, repeated consumption solution
TypeScript 学习【7】高级类型:联合类型与交叉类型
Recommend this UI automation testing framework and write use cases as colloquially as possible
拉下新项目代码爆红
Penetration test path dictionary, blasting dictionary
Differences between tinyint and int
In 2022, the database audit manufacturer will choose cloud housekeeper! Powerful!
June 2022 Tsinghua Management Tsinghua University Ning Xiangdong
The half year revenue of mushroom street was 168million yuan: a year-on-year decrease of 29% and an operating loss of 240million yuan
Failed to crawl HTML into MySQL insert
Clcnet: Rethink integrated modeling with classified confidence network (with source code download)
SQL summary statistics: use cube and rollup in SQL to realize multidimensional data summary
Apache devlake code base guide
TypeScript学习【6】 接口类型
STM32 FreeRTOS task Basics
Why do it systems need observability?
2022 "Cyberspace Security" event module B of Jiangxi secondary vocational group - SQL injection test
Design idea of three party account authorization login system
MarathonLb的负载研究
ETF operation practice record: March 2, 2022