Create a structure and give it three elements as follows:
struct student{ int rollno; char name[10]; int arr[]; }stud1, stud2;
now give 4 label entries on stud1 and 5 label entries on stud2. I told the interviewer that we must give an array of some size, otherwise it will not be assigned any space, or this will give a compiler error. He said that according to the new C standards, this is possible. Finally, I could not figure out how to do this. Anyone have any suggestions? I tried to realloc, but I was not sure if this would work.
source share