0% found this document useful (0 votes)
31 views1 page

print Book1 Info/: Charsubject

The document defines two book structures called Book1 and Book2. It initializes Book1 with the title "C Programming", author "Nuha Ali", subject "C Programming Tutorial", and ID 6495407. Book2 is initialized with the title "Telecom Billing", author "Zara Ali", subject "Telecom Biling Tutorial", and ID 6495700. The main function then prints out the attributes of each book structure.

Uploaded by

Arun Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
31 views1 page

print Book1 Info/: Charsubject

The document defines two book structures called Book1 and Book2. It initializes Book1 with the title "C Programming", author "Nuha Ali", subject "C Programming Tutorial", and ID 6495407. Book2 is initialized with the title "Telecom Billing", author "Zara Ali", subject "Telecom Biling Tutorial", and ID 6495700. The main function then prints out the attributes of each book structure.

Uploaded by

Arun Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

#include <stdio.

h> /* book 2 specification */


#tinclude <string.h> strcpy( Book2.title, "Telecom Billing");
struct Books strcpy( Book2.author, "Zara Ali");
strcpy( Book2.subject, "Telecom Biling Tutorial");
char title[50]; Book2.book_id = 6495700;
char author[50]; /printBook1 info/
charsubject[100); printf("Book 1title : %s\n", Book1.title);
int book_id; printf( "Book 1 author : %s\n", Book1.author);
printf( "Book 1 subject: 6s\n", Book1.subject);
intmain() printf( "Book 1 book_id: %d\n", Book1.book_id);
print Book2info */
struct Books Book1; /* Declare Book1 of type Book */ printf("Book 2 title : %s\n", Book2.title);
struct Books Book2;/* Declare Book2 of type Book */ printf( "Book 2 author : %s\n", Book2.author);
/ book 1specification */ printf( "Book 2 subject: %s\n", Book2.subject);
strcpy( Book1.title, "C Programming"); printf "Book 2 book_id : %d\n", Book2.book_jd);
strcpy( Book1.author, "Nuha Ali"); return 0;}
strcpy( Book1.subject, "C Programming Tutorial");
Book1.book_id= 6495407;

You might also like