0
Structure in c
how to make a structure in c named bookrecord to make author name and title name of the book. #include<stdio.h> #include<conio.h> struct bookrecord { char name[10]; char title[10]; }book={"J","Rainbook"}; int main() { }
3 Answers
+ 4
Well. You already have the struct. All you need to do, is to use it.
printf("%s\n", book.name);
printf("%s\n", book.title);
0
Aint working properly
#include<stdio.h>
struct bookrecord
{
char name[10];
char title[10];
};
int main()
{
struct bookrecord b;
printf("Enter book aurthor name ");
scanf("%s ",&b.name);
printf("Enter book name ");
scanf("%s ",&b.title);
printf("Book Details ");
printf("Book name = %s ",b.name);
printf("Book title = %s ",b.title);
return 0;
}