I need help Regarding c language as my lab task khow to id print all name s in one loop : This code is about 'struct' in C..

I created a struct  with the properties name,roll etc.. By using the for-loop I let the user to create the struct objects. they are named as student,employee, faculty

the problem is the objects are created. But I can use them only inside the for-loop. If I want to get the value of all names in main function, it doesn't work. How can I solve it?How do i print all names in the code in only one loop

   

     #include<stdio.h>
        #include<conio.h>  
        	 struct student
        	 {
        		int std;
        		char fee[90];                                 //Collect Data of students
        		int rollno;
        		char name[15];
        		char sub[100];
        	  };
        		main()
        		{
        			int x;
        				printf("******Enter the total number of Student from HOD*******:\n");
        			scanf("%d",&x);
        			struct student a[x];
        			for(int i=0;i<x;i++)
        			{
        				printf("\nEnter Rollno:\t");
        				scanf("%d",&a[x].rollno);
        				printf("\nEnter name:\t");
        				scanf("%s",&a[x].name);
        				printf("\nIs Fee Submitted:\t");
        				scanf("%s",&a[x].fee);
        				printf("\nEnter Subject name:\t");
        				scanf("%s",a[x].sub);
        				}
        				printf("\n****Display All Student names****");
        					for(int i=0;i<x;i++)
        			{
        				
        				printf("\n%s",a[x].name);
        	
        }	
        			
        	
        
        	
        	//Faculty 
        	struct faculty
        	{
        		char Fname[100];
        		char Sname[100];
        	};
        	
        		int y;
        		printf("\n\n********Please HOD enter the total faculty members********\n");
        		scanf("%d",&y);
        		struct faculty b[y];
        		for(int j=0;j<y;j++)
        		{
        			printf("\nEnter Faculty Member Name:\t");
        			scanf("%s",&b[y].Fname);
        			printf("\nEnter their Subjects:\t");
        			scanf("%s",&b[y].Sname);
        		}
        		printf("\n****Display all Faculty Member Name****");
        			for(int j=0;j<y;j++)
        		{
        		printf("\n%s",b[y].Fname);
        }
        		
        // Employes
        struct employes
        {
        	char ename[100];
        	char rank[100];
        };
            int z;
            printf("\n\n********please HOD enter the total no of Employes*******:\n");
        	scanf("%s",&z);
        	struct employes c[z];
        		for(int j=0;j<y;j++)
        	{
        		printf("\nEnter the Employe name:\t");
        		scanf("%s",&c[y].ename);
        		printf("\n and enter their ranks:\t");
        		scanf("%s",&c[y].rank);
        		
        	}
        	printf("\n****Display all Employe names****");
        			for(int j=0;j<y;j++)
        	{
        		printf("%s\n",c[y].ename);
          }
        	
        }