The program runs without any errors, it prompts the user to enter row and column numbers so that it can construct a 2D array. If you enter 2 for rows and 2 for columns, it proceeds to the next step but if you enter 3 and above, it terminates with an error
"there is a problem causing this program to stop working..."
Here is my code
#include <stdio.h>
#include <string.h>
#include <malloc.h>
//declaring structure called student
struct student {
    //members of the structure
    char last_name[30];
    char first_name[30];
};
//declaring structure called  classroom_seating
struct classroom_seating {
    struct student **seating ;
};
//Functions implementation for struct student.
void student_init_default(struct student *s) {
    //initializing the data members to string "???"
    strcpy(s->first_name, "???");
    strcpy(s->last_name, "???");
}
void student_init(struct student *s, char *info) {
  /* Use the strtok function to extract first name and
    last name from the variable student, then assign
    them to each instance variable of the student
    structure*/
  strcpy(s->first_name, strtok(info, "/"));
  strcpy(s->last_name, strtok(NULL, "/"));
}
void student_to_string(struct student *s) {
    //printing the initial character of the first name, a period, the initial character of the last name, and a
    //period
    printf("%c.%c.", s->first_name[0], s->last_name[0]);
}
//end of step1
//step2
//Functions implementation for struct classro classroom_seating_init(int rowNum, int columnNum, struct classroom_seating *a){
//It instantiates a two-dimensional array of the size "rowNum" by "columnNum" specified by the
//parameters inside the struct a. Then it initializes each student element of this array using the student_init_default function
void classroom_seating_init(int rowNum, int columnNum, struct classroom_seating *a){
  a->seating=malloc((sizeof(a->seating[rowNum][columnNum])));
   //initializing the counters
    int i = 0;
    int j = 0;
    for (i = 0; i < rowNum; i++) {
        for (j = 0; j < columnNum; j++) {
        student_init_default(&a->seating[i][j]);
        }
       printf("\n");
    }
}
int assign_student_at(int row, int col,struct classroom_seating *a,struct student *s) {
    char str1[30];
    strcpy(str1, a->seating[row][col].first_name);
    if (strcmp(str1, "???"))
    {
        strcpy(a->seating[row][col].first_name,s->first_name);
        strcpy(a->seating[row][col].last_name,s->last_name);
        return 1;
    }
    else {
        return 0;
    }
}
int check_boundaries(int row, int col, struct classroom_seating *a) {
    if (row < 0 || col < 0) {
        return 0;
    }
    else if (row > sizeof(a->seating) || col > sizeof(a->seating[0])) {
        return 0;
    }
    else {
        return 1;
    }
}
void classroom_seating_to_string(struct classroom_seating *a) {
    printf("The Current Seating\n");
    printf("-------------------\n");
    int i = 0;
    int j = 0;
    for (i = 0; i < sizeof(a->seating); i++) {
        for (j = 0; j < sizeof(a->seating[0]); j++) {
            student_to_string(&a->seating[i][j]);
        }
        printf("\n");
    }
}
//end of functions implementation.
//main function
int main(){
    //variable declaration
  struct student s;
  struct classroom_seating a;
  char info[30];
  int rowNum,colNum,row,col;
//taking the inputs from the user,,,enter number of rows and columns that the array will have
  printf("Please enter a number of rows for an classroom seating.");
  scanf("%d",&rowNum);
  printf("Please enter a number of columns for an classroom seating.");
  scanf("%d",&colNum);
  //
  classroom_seating_init(rowNum,colNum,&a);//calling method to create a 2D array for class arrangement.
  printf("Please enter a student information or enter \"Q\" to quit.");
  scanf("%s",&info);
  student_init(&s, info);
  while (1) {
        printf("\nA student information is read.\n");
        // printing student information.
        student_to_string(&s);
         printf("\n");
        // Ask a user to decide where to seat a student by asking for row and column of a seat
        printf("Please enter a row number where the student wants to sit.");
        scanf("%d",&row);
        printf("Please enter a column number where the student wants to sit.");
        scanf("%d", &col);
        // Checking if the row number and column number are valid
        if (check_boundaries(row, col, &a) == 0) {
            printf("\nrow or column number is not valid.");
            printf("A student %s %s is not assigned a seat.\n",s.first_name, s.last_name);
        }
        else {
            // Assigning a seat for a student
            if (assign_student_at(row, col, &a, &s)== 1) {
                printf("\nThe seat at row %d and column %d is assigned to the student\n", row, col);
                student_to_string(&s);
                classroom_seating_to_string(&a);
            }
            else {
                printf("\nThe seat at row %d and column %d is taken.\n", row, col);
            }
        }
        // Read the next studentInfo
        printf("Please enter a student information or enter \"Q\" to quit.");
        // reading a student's information
        scanf("%s", info);
    }
return 0;
}
 
     
    