structure question

PHOTO EMBED

Fri Jun 10 2022 17:49:26 GMT+0000 (Coordinated Universal Time)

Saved by @KanishqJ8

typedef struct driver{
    char name[34];
    char dLnum[45];
    char route[47];
    int kms;
}dr;

 int main(){
     dr d1,d2,d3;
     printf("enter the details of the first driver\n");
     printf("enter the name of first driver\n");
     scanf("%s",&d1.name);
     printf("enter the dL number  of first driver\n");
     scanf("%s",&d1.dLnum);
     printf("enter the route of first driver\n");
     scanf("%s",&d1.route);
     printf("enter the kms of first driver\n");
     scanf("%d",&d1.kms);
     
     printf("printing the info\n");
     printf("name is %s\n",d1.name);
     printf("dL number is %s\n",d1.dLnum);
     printf("route is %s\n",d1.route);
     printf("kms are %d\n",d1.kms);
 }
content_copyCOPY