Question

Explain how will you allocate memory dynamically for a two dimensional array of floating point numbers.

18 Feb 2025
Answer :
Word Count : 282

To allocate memory dynamically for a two-dimensional array of floating point numbers in C, we can use pointers and the `malloc()` function. The first step is to allocate memory for the array of pointers, where each pointer will represent a row. Then, for each row, we allocate memory to hold the elements (columns) of that row. Here's how this can be done:

1. Step 1: Allocate memory for the rows _________ ________ _______ ____ ____ ________ ___ _____ _____.
_______ __________ ____ ________ _________.
__________ _____ __________ ____ ______ ___.
__________ ____ ___ ______ _______ __________ _________.
____ _________ ____ _________ _________ ________ _______ ___ ___.
___ _______ ___ ______ _________ ____.
________ ___ _________ ___ ___ _______ _________ ________ ____ _______ _______ _____.
__________ _________ _______ _______ _______ __________ ___ __________.
_________ ______ _______ _______ ___ _______.
_____ ____ ____ __________ _________ ___ ___ __________ ______ ___.
___ __________ _______ _________ ______ _____ _________ ________ _______.
_____ _______ _________ ________ _____ ____ _______ _________ _______ ______.
____ ________ _______ ____ ________ ____ ________ ____ _______ __________ ________ ____.
______ ___ ____ ___ _________ _________.
_______ _______ ___ ______ ______.
_________ _________ _____ _______ _______ __________ __________ __________ _________ _____ _____.
_________ ____ _______ ________ _____ ______ _____ ____ ________ ______ _______.
_________ ____ ________ ___ _________ _______ _________ _____ _______ __________.
_______ _____ __________ _________ _______.
____ ___ ______ ______ _________ __________ ______ _______ _____.
___ _____ ___ ___ _______ ___ _______.
______ ______ ________ ______ __________ _____ __________.
_________ ____ ___ ________ _________ __________ __________.
________ _____ ________ _____ ___.
________ ___ __________ ______ ____ _____ _____ ________.
_____ ____ _______ _________ ____ ___ _________ _______ ____ ________ __________ ________.
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 Explain how will you allocate memory dynamically for a two dimensional
🟢
WhatsApp Chat Fast live messaging
Email Us Business enquiries & support