Share your repls and programming experiences

← Back to all posts
subject and ptint
201910097 (0)


struct book
char name[16];
float salary;
int ID;
char sub1[16];
char sub2[16];
char sub3[16];


int main()
struct book b1;

printf("enter the name, price and ID of book1 and subject\n");
scanf("%s %f %d %s %s %s",,&b1.salary,&b1.ID,b1.sub1,b1.sub2,b1.sub3);

printf("\n NAME %s price =%f ID= %d sub 1=%s sub2= %s sub3= %s",,b1.salary,b1.ID,b1.sub1,b1.sub2,b1.sub3);

return 0;