Predict the output of below program
Explanation: The operator * is used for dereferencing and the operator & is used to get the address. These operators cancel effect of each other when used one after another. We can apply them alternatively any no. of times. For example *ptr gives us g, &*ptr gives address of g, *&*ptr again g, &*&*ptr address of g, and finally *&*&*ptr gives ‘g’
Now try below
- Double Pointer (Pointer to Pointer) in C
- Pointers in C and C++ | Set 1 (Introduction, Arithmetic and Array)
- Dangling, Void , Null and Wild Pointers
- NULL pointer in C
- What are near, far and huge pointers?
- Function Pointer in C
- Generic Linked List in C
- void pointer in C
- Result of sizeof operator
- An Uncommon representation of array elements
- Pointer vs Array in C
- Why C treats array parameters as pointers?
- How to declare a pointer to a function?
- Output of C Programs | Set 1
- Output of the Program | Use Macros Carefully!
Improved By : MOHAKGOEL