How do i define a 2D array using malloc ? (lets say 10X20).
second, can i increase number of rows or cols without creating a new increased array and copying all data
second, can i increase number of rows or cols without creating a new increased array and copying all data to it?
No, you can't change the size of an array. What you can do is use pointers and realloc to do so.