Possible Solution

#include <stddef.h>
#include <stdio.h>

void
initMatrix(size_t m, size_t n,
     double *A,
     ptrdiff_t incRow, ptrdiff_t incCol)
{
    for (size_t i=0; i<m; ++i) {
        for (size_t j=0; j<n; ++j) {
            A[i*incRow+j*incCol] = i*n+j+1;
        }
    }
}

void
printMatrix(size_t m, size_t n,
            const double *A,
            ptrdiff_t incRow, ptrdiff_t incCol)
{
    for (size_t i=0; i<m; ++i) {
        for (size_t j=0; j<n; ++j) {
            printf("%10.3lf", A[i*incRow+j*incCol]);
        }
        printf("\n");
    }
    printf("\n");
}

#define MAX_ROWS    100
#define MAX_COLS    100

double A[MAX_ROWS*MAX_COLS];

int main()
{
    size_t m = 5;
    size_t n = 8;

    size_t incRow = n;
    size_t incCol = 1;


    initMatrix(m, n, A, incRow, incCol);
    printMatrix(m, n, A, incRow, incCol);

    // make additions here:

    // 1) initialize column wise
    initMatrix(n, m, A, incCol, incRow);
    printMatrix(m, n, A, incRow, incCol);

    // 2) print second row
    printMatrix(1, n, &A[1*incRow], incRow, incCol);

    // 3) print third col
    printMatrix(m, 1, &A[2*incCol], incRow, incCol);

    // 4) init the sub-matrix B that refers to A(2:4, 3:6)
    initMatrix(3, 4, &A[2*incRow+3*incCol], incRow, incCol);

    // 5) print matrix A again
    printMatrix(m, n, A, incRow, incCol);

    return 0;
}