The aim is to include an array of an structure inside an other array of an other structure. Both structure arrays should be declared and initialised seperate. The questeions and answeres suggested as similarly only had one component of my questeion but not this or an similar combination. The code I added here is just a simplified example. All array sizes and elements are known before execution.
This is the example code, that can not be compiled "Segmentation fault":
#include <stdio.h>
#include <string.h>
struct student_course_detail
{
    int  course_id;
    char course_name[50];
};
struct student_detail 
{
    int id;
    char name[20];
    // structure within structure
    struct student_course_detail *course[2]; 
}stu_data[2], *stu_data_ptr[2];
struct student_course_detail course_data[2] = {
  {71145, "Course 1"}, 
  {33333, "Course 2"},
}; 
struct student_detail stu_data[2] = {
    {1, "Anna", &course_data[1]},
    {2, "Tom", &course_data[2]}
};
int main() 
{
    stu_data_ptr[2] = &stu_data[2];
    printf(" Id is: %d \n", stu_data_ptr[0]->id);
    printf(" Name is: %s \n", stu_data_ptr[0]->name);
    printf(" Course Id is: %d \n", 
                         stu_data_ptr[0]->course[0]->course_id);
    //printf(" Course Name is: %s \n", 
    //                 stu_data_ptr[0]->course[0]->course_name);
    //printf(" Course Id is: %d \n", 
    //                     stu_data_ptr[0]->course[1]->course_id);
    //printf(" Course Name is: %s \n", 
    //                  stu_data_ptr[0]->course[1]->course_name);
    return 0;
}
Link to the code-example: https://www.onlinegdb.com/Hk2NQ42OU

