Write a C program to declare structure of student with data members book,prize and page.
Answers
Answered by
1
#include<stdio.h>
main()
{
struct book
{
char name[23];
float price;
int pages;
};
struct book b1, b2 ;
printf("\nEnter names, prices & no. of pages of 2 books\n");
scanf("%s %f %d", &b1.name, &b1.price, &b1.pages);
scanf("%s %f %d", &b2.name, &b2.price, &b2.pages);
printf("\n%s %f %d", b1.name, b1.price, b1.pages);
printf("\n%s %f %d", b2.name, b2.price, b2.pages);
}
aryanbanafal7:
not the same question bro u copied the answer
Similar questions