Day#99 C' Coding Challenge

Day#99 C' Coding Challenge

What do you mean by nested structure? Are these allowed in C Programming language?

--------------------------------------------------

  • Nested structure is structure within a structure
  • A structure can be declared within a structure similar to how we declare variables in a structure
  • Below is an example of the nested structure:

struct student_marks
{
    int total_marks;
    float percentage;
};
 
struct student 
{
    int student_id;
    char student_name[20];
    struct student_marks student_marks_data;    
};

Post a Comment

0 Comments