Share your repls and programming experiences

← Back to all posts
q1
201910097

#include<stdio.h>
#include<stdlib.h>
typedef struct book
{
char name[10];
float roll;
int ID;
char sub1[10];
char sub2[10];
char sub3[10];

int main()
{
book *ptr;
book b1;

ptr=&b1;

printf("enter the name, price and ID of book1 \n");
scanf("%s %f %d %s %s %s", ptr->name, &(ptr->roll), &ptr->ID , ptr->sub1 , ptr->sub2 , ptr->sub3 );
printf("\n NAME %s price =%f ID= %d %s %s %s",ptr->name,(ptr->roll),ptr->ID, ptr->sub1 , ptr->sub2 , ptr->sub3 );

return 0;
}

Voters
201910097
Comments
hotnewtop
timovernier

Mein watch swiss made