I created a program to let user input the number there credentials . Before that they have to declare the number of employees present . Whenever i run the code and enter the value of variable people ; after that instead of asking for an input it gives of Name == name is as an output Is there any explanation for it
#include<stdio.h>
struct employee{
char name[40];
char company[40];
int age;
};
int main(){
int people;
printf("How many peoplees data is being entered : ");
scanf("%d",&people);
struct employee credentials[people];
for(int count=0;count<people;count++){
printf("Name == ");
gets(credentials[count].name);
printf("name is %s\n\n",credentials[count].name);
}
return 0;
}