I want to take a number input from the user. I want it to work as a user defined array of structure.
#include <stdio.h>
#include <string.h>
#include<stdlib.h>
int main(void)
{
struct Data
{
char Name[10];
int Age;
char Gender;
};
int i, n;
struct Data D[n];
printf(" \n enter the number of user : ");
scanf("%d",&n);
printf("enter the User details :");
for(i=0;i<n;i++)
scanf("%s" "%d" "%c",D[i].Name,&D[i].Age,&D[i].Gender);
return 0;
}