Skip to main content

Posts

Featured

Write a c program to accept n book details such as book_title, book_author, publisher and cost.Assign the accession number to each book in increasing order Display these details as 1 Book of specific author 2 Books by specific publisher 3 All books costing Rs. 500 and above 4 All books.

#include<stdio.h> #include<conio.h> #include<stdlib.h> #include<string.h> void book_auth(); void book_pub(); void book_cost(); void disp_book(); void add_book(); struct book { char book_title[20]; int  acc_no; char author[20]; char pub[20]; int cost; }; int count; struct book b[100]; void main() { int ch; while(1) { clrscr(); printf("\n 1:add book \n"); printf("\n 2:specific author \n"); printf("\n 3:specific publisher \n"); printf("\n 4:cost above 500 \n"); printf("\n 5:all book \n"); printf("\n 6:exit \n"); printf("\n\n enter the choice \n"); scanf("%d",&ch); switch(ch) { case 1: add_book(); getch(); break; case 2: book_auth(); getch(); break; case 3: book_pub(); getch(); break; case 4: book_cost(); getch(); break; case 5: disp_book(); getch(); break; case 6:exit(0); } } } void add_book() { if(count==9) { printf("\n

Latest Posts

Write a ‘C’ program to reverse an array elements using D.M.A.

Write a c program to create student structure having field roll_no, stud_name, class. Pass this entire structure to function and display the structure element

Write a ‘C’ program to swap two numbers using bitwise operator

Write a menu driven program to perform following option Right shift Left shift One’s complement

Write a c program to accept the n names from the user stores these names into 2-d array accept the name from user and search whether the name is present in an array or not

Write a c program to crate a student structure having field stud_name and address accept the details of ‘n’ student into the structure, rearrange the data in alphabetic order of stud_name and display the result

Write a ‘C’ program to calculate the sum of two mXn matrix and store the result in third matrix

Write a ‘C’ program to do following a) Create the text file ‘input. text’ b) Print the content of file in reverse order

Write a ‘C’ program to accept n numbers from user and find out the maximum element out of them using DMA

Write a c program to calculate the length of the string without using standard function