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

C Programming Book Structure Examples

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

C Programming Book Structure Examples

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

w.a.p. on structure 1 w.a.p.

on structure 2

#include<stdio.h> #include<stdio.h>

#include<conio.h> #include<conio.h>

#include<string.h> #include<string.h>

struct books struct books {

{ char title[20];

char title[20]; int page;

int page; char author[20]; };

char author[20]; void main() {

}; clrscr();

void main() struct books book1;

{ struct books book2;

struct books book1; printf("Enter Title of Book1");

struct books book2; scanf("%s",&[Link]);

strcpy([Link],"C Programming"); printf("Enter the Author of Book");

strcpy([Link],"Navpreet Singh"); scanf("%s",&[Link]);

[Link]=124; printf("Enter Pages of The Book");

strcpy([Link],"Accounting"); scanf("%d",&[Link]);

strcpy([Link],"Aggarwal"); printf("Enter Title of Book2");

[Link]=77; scanf("%s",&[Link]);

printf("Book1 Title: %s\n",[Link]); printf("Enter the Author of Book2");

printf("Book1 Author: %s\n",[Link]); scanf("%s",&[Link]);

printf("Book1 Pages: %d\n",[Link]); printf("Enter Pages of The Book2");

printf("Book2 Title: %s\n", [Link]); scanf("%d",&[Link]);

printf("Book2 Author: %s\n",[Link]); printf("Book1 Title: %s\n",[Link]);

printf("Book2 Pages: %d\n",[Link]); printf("Book1 Author: %s\n",[Link]);

getch(); printf("Book1 Pages: %d\n",[Link]);

} printf("Book2 Title: %s\n", [Link]);

printf("Book2 Author: %s\n",[Link]);

printf("Book2 Pages: %d\n",[Link]);

getch(); }

You might also like