#include<stdio.h>
int main(){
int i, roll[10];
char name[500];
for(i=0;i<5;i++){
printf("Enter Roll Number : ");
scanf("%d",&roll[i]);
printf("Enter Name : ");
scanf("%s",&name[i]);
}
printf("\nStored Information");
for(i=0;i<5;i++){
printf("\nRoll Number : %d",roll[i]);
printf("\nName : %s",&name[i]);
}
return 0;
}
you will have to 2D string to strore string array
char str[10][500];
which will store name of 10 student
Each student name can be of (500-1) character long