18. Structure developer program to create a structure called library to hold details of a book viz, the book, and flag indicating whether book is issued or not fetch some sample data and display the same in C programming.

18. Structure developer program to create a structure called library to hold details of a book viz, the book, and flag indicating whether book is issued or not fetch some sample data and display the same in C programming.


#include<stdio.h>

#include<conio.h>

#include<string.h>

#define SIZE 20


struct bookdetail

{

          char name[20];

          char author[20];

          int pages;

          float price;

};


void output(struct bookdetail v[],int n);


void main()

{

          struct bookdetail b[SIZE];

          int n,i;

          clrscr();

          printf("Enter the Numbers of Books:");

          scanf("%d",&n);

          printf("\n");

          for(i=0;i<n;i++)

          {

                   printf("\t=:Book %d Detail:=\n",i+1);

                   printf("\nEnter the Book Name:\n");

                   scanf("%s",b[i].name);

                   printf("Enter the Author of Book:\n");

                   scanf("%s",b[i].author);

                   printf("Enter the Pages of Book:\n");

                   scanf("%d",&b[i].pages);

                   printf("Enter the Price of Book:\n");

                   scanf("%f",&b[i].price);

          }

          output(b,n);

          getch();

}


void output(struct bookdetail v[],int n)

{

          int i,t=1;

          for(i=0;i<n;i++,t++)

          {

                    printf("\n");

                   printf("Book No.%d\n",t);

                   printf("\t\tBook %d Name is=%s \n",t,v[i].name);

                   printf("\t\tBook %d Author is=%s \n",t,v[i].author);

                   printf("\t\tBook %d Pages is=%d \n",t,v[i].pages);

                   printf("\t\tBook %d Price is=%f \n",t,v[i].price);

                    printf("\n");

          }

}




Practical Lists with Source Code :

  1. Develop minimum 2 program using constants variables, arithmetic expression.
  2. Develop minimum 2 programs increment/decrement operators, exhibiting data type conversion.
  3. Write a simple program to convert temperature in a Fahrenheit degrees to Centigrade degrees in c programming.
  4. Write a simple program to calculate the area and the parameter of a rectangle and the area of circumference of the circle
  5. Write a program to determine whether a given year is a leap year in c programming
  6. Write a program to determine whether a string is palindrome in c programming
  7. Write a program to find the greatest of the three number using conditional operators in C program
  8. Write a program to find if a given character is vowel in C program
  9. Using switch statement write a program to print a day of the week by taking a number from 1 to 7 in C programming
  10. Using a switch statement write a program to print the students grade by accepting a percent marks in C programming 
  11. Using switch statement write programs to check whether the triangle is isosceles, equilateral, scalene or right angled triangle.
  12. Looping write a program to find the sum of a digit of a given number in C program
  13. Looping write a program to generate multiplication table up to 10 for numbers 1 to 5 in C program
  14. Write a program to find the Fibonacci series in the given number in C programming
  15. Write a program to produce the following input1 2 3 4 5 6 7 8 9 10
  16. Array develop a program to sort the list of the number 10 in c programming
  17. Array write a program to perform the addition of 3 x3 matrix in C programming
  18. Structure developer program to create a structure called library to hold details of a book viz, the book, and flag indicating whether book is issued or not fetch some sample data and display the same in c programming C programming.
  19. Structure develop a program to execute C program to add two distance given in a kilometer using a structure in a C program.
  20. Library function develop program to demonstrate use of all string handling function in c programing.
  21. Library use of few mathematical function in C programming. 
  22. Library functions develop program to demonstrate use of few other Miscellaneous C programs 
  23. User defined function develop a program to create a function to find the GCD of a given number call this function in c program.

Post a Comment

Previous Post Next Post