Question

Briefly discuss the relation between pointers and arrays, giving suitable example. Write a program in C, to print transpose of a 2D matrix entered by a user. Also give comments.

30 Nov 2023
Answer :
Word Count : 651

In both C and Python, pointers and arrays have an intricate relationship. Arrays can be thought of as a sequence of elements of the same data type stored in contiguous memory locations, while pointers hold memory addresses as their values. In C, arrays and pointers often get intertwined due to the way arrays are internally represented. When you declare an array, it effectively represents a pointer to the first element of that array.

Let's delve into this relationship using an example and then create a C program to print the transpose of a 2D matrix entered by the user.

Consider an array in C:

```c
int arr[5] _______ _________ _________ _________ ________ _________ ____ ____ ________ ______.
___ __________ _________ _____ ____ _____ ______ ____ _______ __________ ___.
__________ ___ ______ __________ ________ ___ _______.
___ ____ ________ ______ ________.
________ __________ _________ ______ _______ ____ ______ ________ ______.
_______ _____ ___ ________ ___ ____ _________ ____ ____ ____ ______ ___.
_______ ________ __________ _____ _____ _________ __________ ___ _____.
___ ________ ________ _____ _________ ________ __________.
________ ___ ____ _________ _______ _______ _____ ______ ____ _________.
___ _______ ______ ___ ___ ___ _______ _____ ___ _______ __________ _______.
____ __________ _______ _____ ______ ________ _______ _________.
______ ______ _________ _______ ___ ______ __________ _______ ____.
_______ _______ _________ ________ ___ ____ _____ _____ ___ ____.
______ ___ __________ ___ ___ ____ ____.
_________ ___ ___ ______ ___ __________.
_________ ________ ______ _________ ______ ____ _______ ___.
_________ __________ ______ ____ ___ __________.
_________ ______ ______ ____ _______ _______ _________ _____ ___ ______ ____.
_________ ______ _______ ___ __________ ____ _______ __________ _____.
________ __________ ____ ______ ______ ________ _____ ____ _________ ________.
______ _________ ___ ___ _______ _______ _____ ___ _________.
_________ _____ _________ __________ ____ _____ ____ _________ ________ ________ ___.
___ ________ ___ _______ ____ ________ _______.
___ ___ _________ ________ ______ __________ ___ ___.
_________ _________ ____ _______ _________ ____ _________.
____ __________ _______ ____ __________.
____ _______ _________ ___ _______ _____ _____ __________ ___ _________ _____.
___ ______ __________ ________ ________ ________ ______ ________.
_____ _________ ________ ______ ________.
________ _______ __________ __________ _________ _______.
_________ _______ _______ ___ __________ _______ __________ _________ _____ __________ ___.
___ ________ _____ _____ _____ ______ __________ _______.
___ ____ __________ _____ _________ ____ ______ __________ ______ _________ _______ _______.
_____ ___ ___ ____ ____.
_______ _____ ____ _____ ________ __________ _________ _______ _____ _____ _________ __________.
______ _____ _____ _____ ____ _____ ______ ________ ________.
___ ____ _________ _________ __________.
____ ___ _____ __________ ______ ________ ________.
____ ___ ___ ________ _______ ____ ___.
________ _____ _________ _______ _______ ___.
_________ __________ _______ ____ ____ ____ ______ _______ _____ _______ ______.
____ ___ _____ __________ _____ ________ _____ __________.
______ ________ ________ __________ _______ ______ _______ ________ ________.
________ ______ ________ _________ _______ ____ ______ _______.
_________ ________ ________ ___ _____ ____ _______.
______ ______ _______ _________ _________ ________ ___ ________.
_________ _____ _____ _________ __________ ____ _________ _____.
_______ ______ __________ _____ ______ __________ _____ _____ ____ _____ __________ _____.
___ __________ ______ _________ ________ _________ ____.
____ _______ ___ __________ ________ _________ ___ _______.
_________ ________ _____ __________ _________ ______ _____ __________.
________ ________ _______ __________ ____ ______ ______ ______ ____ _________.
___ _____ ______ ___ _________ ___ _________ __________ __________.
__________ ________ _________ ______ ____ _________ _________.
_____ ____ _________ ________ _______ ______ ______.
_________ _______ ___ _________ ___ _________ ________ ______ ____.
__________ ______ _____ __________ _______ ___ _________ ___ _______ ____ ______ _______.
_____ _______ _________ _______ ______ ______.
_______ ___ _______ __________ ________ __________ __________.
_____ _______ _________ _________ ______ _________ ________ __________ _______.
_______ _______ ________ _____ _________ ______.
____ ____ ___ _______ _____ _______ ___ ________ __________ _______.
_____ ______ __________ _________ __________ ____ ___ ________ ______.
__________ _____ ______ ________ ____ _____ ______ _________ ________ ___ ______ _________.
__________.
Get Full Answer on WhatsApp

IGNOU NEWS
Assignment Submission Last Date Extended Till 30 June 2026 Click Here★★★IGNOU June 2026 TEE Date Sheet Released Click Here★★★
Top
📞
Call Support Instant phone assistance Briefly discuss the relation between pointers and arrays, giving suita
🟢
WhatsApp Chat Fast live messaging
Email Us Business enquiries & support