How would you differentiate between the terms pointer to an array and array of pointers? Give proper examples.
The terms "pointer to an array" and "array of pointers" refer to different concepts in C programming, distinguished by how they are declared and used.
1. **Pointer to an Array**:
- A pointer to an array is a pointer variable that points to the first element of an array.
- When you have a pointer to an array, you can access elements of the array using pointer arithmetic.
________ ___ _____ _____ ____ _______ ___.
_________ ___ ________ ________ __________ ________ ________ ________ _______ _________.
_____ ____ ____ ____ ___.
__________ ______ _______ ____ _____ ________ _________ _______ _________ ______ ____ _________.
_____ ____ _______ _______ _______ ____ ____.
____ _____ _________ ____ _________ __________ ________ _____ ____ _____ ______.
______ ______ __________ ___ ____ __________ ___ ___.
__________ _________ _________ ______ _________ ______.
_________ ________ _______ _______ ________ ____ ___ _______ ___ ___.
__________ ______ ___ ______ _____ ____ _________.
______ _________ ___ _____ _________ ____ _________ ___.
___ ______ ________ ______ ____ _______ _____ ________ ________ _________ ________ _____.
__________ _______ _______ _________ __________.
____ ____ ___ _______ _______ _______ _________ ___.
____ ______ ______ _________ _____ ________ ___ ________ ____.
_______ _____ _____ ________ ___ ___ _________ ____ ______ __________ ______ _______.
_______ ________ ________ _______ _________.
______ ________ ______ _____ _______ _______ ________.
_____ ___ ___ ___ _____ _______.
________ ______ ______ ___ _____ ________ ___ ____.
___ ______ ________ _________ _________ _________ _______ _____ _________.
____ ___ ______ _______ ________.
____ ______ __________ _________ __________ _______ _____ _____ ___.
______ _______ __________ _______ _________.
___ _______ __________ ___ _______ ___ _________ ___ _________ ___ __________.
_________ ________ ____ ______ ________ ____ ____ _______ _______ _________.
_____ ______ ______ ______ __________ _________ _______.
_______ ____ _____ __________ _________ ____ _________ ___ ___ ___.
_____ _______ ___ ____ _____ ___.
_________ __________ ____ __________ _______ _________ ________ ___ ______ _____ _____.
_______ __________ ________ _________ ________ __________ ________.
______ __________ ______ _____ ______ ______ ______ ________ ______ _______ ____.
____ ________ ___ ______ ___ ____ _______ __________.
_____ _______ ____ ____ _______ _______ ________.
___ ___ _________ ______ ______ __________ _____ ________ ___ ____.
_____ _______ ________ _________ ________ ______ _____ ___ ____ __________ __________.
_________ _______ _________ _____ ___.
_______ ____ __________ _____ ______ _____ _____ ______ _____ __________ _____ _______.
___ _______ ____ ______ __________ ______ _______ ___.
________ ______ ___ _____ ________.
__________ ________ _____ ______ ______.
__________ _______ ________ _____ ____ _________ _____ ______ _______ ________.
______ _______ __________ ____ ____ _________ ________ _________.
________ _________ __________.
Get Full Answer on WhatsApp