C Create Dynamic 2D array

In my last post, I create code to create 2D array in C++. Now, I try to create dynamic 2D array in C. Algorithm to create dynamic 2D array in C or C++ is same. This is a code to create dynamic 2D array in C :

After you create dynamic 2D array in C, you can use this code to free 2D array in C :

Leave a Reply

Your email address will not be published. Required fields are marked *

 

This site uses Akismet to reduce spam. Learn how your comment data is processed.