This is a cut from my code:
##########################################
Code:
/* Database (name,age,salary,height,weight) program using structure and
gets. */
#include <stdio.h>
#include <stdlib.h>
#include <conio.h>
#define MAX 4 /* To define MAX as 4 */
int main()
{
/* Database structure definition. */
typedef struct input{
char name[256];
int age;
int salary;
float height;
float weight;
}Input; /* End structure database. */
Input info[MAX]; /* New type name for struct database. */
int x,age,salary,height,weight; /* initialize variables. */
char name[256]; /* initialize characters. */
/* Loop through database. */
for(x=0;x<MAX;x++)
{
printf("\n Please type full name of person %d \t\t", x+1);
gets(info[x].name);
printf("\n Please type age of person %d \t\t", x+1);
scanf("%d", &info[x].age);
printf("\n Please type salary of person %d \t\t", x+1);
scanf("%d", &info[x].salary);
printf("\n Please type height of person %d \t\t", x+1);
scanf("%f", &info[x].height);
printf("\n Please type weight of person %d \t\t", x+1);
scanf("%f", &info[x].weight);
}
###########################################
I need some answer on the bold area, thank you.