I am new to c language and I tried to create a structure. so here is the my structure.
typedef struct car{
int *transmission;
int *year;
char color[15];
}CAR;
Then I tried to insert the values to the structure variables using below code,
printf("Enter M Year of car : ");
scanf("%d",car1.year);
printf("Enter color of car : ");
scanf("%s",&car1.color);
printf("Enter transmission type of car (1 for manual & 2 for auto): ");
scanf("%d",car1.transmission);
But, it returns an error. pls help me to resolve the issue.
In this structure you shouldn't declare pointers, but variables