How many pointers can be used in one variable?

Asked 2 years ago, Updated 2 years ago, 65 views

It's the same as the title. How many pointers can be used in one variable?

int ****************a; Can I put on an infinite number of stickers?

c++ c pointer

2022-09-22 11:36

1 Answers

In C standard, there is no upper limit, but only lower limit.

5.2.4.1 Translation limits

279 — 12 pointer, array, and function declarators (in any combinations) 
modifying an arithmetic, structure, union, or void type in a declaration
The upper limit is implementation specific.

If you interpret it Shell must support at least 12 pointers, matrices, and functional declarations The upper limit depends on how the shell was implemented.


2022-09-22 11:36

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.