
- C Programming Tutorial
- C - Home
- C - Overview
- C - Environment Setup
- C - Program Structure
- C - Basic Syntax
- C - Data Types
- C - Variables
- C - Constants
- C - Storage Classes
- C - Operators
- C - Decision Making
- C - Loops
- C - Functions
- C - Scope Rules
- C - Arrays
- C - Pointers
- C - Strings
- C - Structures
- C - Unions
- C - Bit Fields
- C - Typedef
- C - Input & Output
- C - File I/O
- C - Preprocessors
- C - Header Files
- C - Type Casting
- C - Error Handling
- C - Recursion
- C - Variable Arguments
- C - Memory Management
- C - Command Line Arguments
- C Programming useful Resources
- C - Questions & Answers
- C - Quick Guide
- C - Useful Resources
- C - Discussion
How many levels of pointers can we have in C/C++?
Actually, C programs one or two static levels of pointers are common. Triple indirection is rare. But infinite is very common. Infinite pointer indirection can be achieved with the help of a struct.
struct list { struct list *next; ... } lst; lst->next->next->next->...->next
and in this way we can implement multiple pointer indirection.
There is another alternative notation as shown below
– *(*(..(*(*(*lst).next).next).next...).next).next
- Related Articles
- How many destructors can we have in one class in C#?
- How many ribs do we have?
- How many bones do we have when we are newborns?
- How many tangents can a circle have?
- How many parameters can a lambda expression have in Java?
- Pointers, smart pointers and shared pointers in C++
- In how many ways we can concatenate Strings in Java?
- How many public classes of the same name it can have in Java?
- How many times can we sum number digits in JavaScript
- In how many ways can we split a string in JavaScript?
- Applications of Pointers in C/C++
- C++ program to count in how many ways we can paint blocks with two conditions
- How to compare pointers in C/C++?
- Can we have generic constructors in Java?
- How can we apply filtering criteria at group levels of the result set returned by MySQL?

Advertisements