Thread: I need help to understand how can i write a c program for storing 10 books informatio

  1. #1
    Registered User
    Join Date
    Nov 2017
    Posts
    22

    I need help to understand how can i write a c program for storing 10 books informatio

    i need help to understand how can i write a c program for storing 10
    books information like book name,authorname,depertment of book
    by usingstructure and function in c .



  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    A development process

    1. Read a book name into a single variable.
    2. Read a book author into another single variable name.
    3. Put both variables in a struct, create a single instance of that struct, and adapt your program.
    4. Make an array of your variable, and adapt your program.
    5. Move the code to read into an array into a separate function, and pass the array as a parameter.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  3. #3
    Registered User
    Join Date
    Nov 2017
    Posts
    22
    GIVE ME AN EXAMPLE WITH C PROGRAM IF IT IS POSSIBLE FOR YOU.tHANKS IN ADVANCE.

  4. #4
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    Two things I don't like.

    1. Lack of effort.
    2. Yelling.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  5. #5
    Registered User
    Join Date
    May 2009
    Posts
    4,183
    "...a computer is a stupid machine with the ability to do incredibly smart things, while computer programmers are smart people with the ability to do incredibly stupid things. They are,in short, a perfect match.." Bill Bryson

  6. #6
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    If you can't get off your arse to even attempt the first step, you deserve to fail.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 9
    Last Post: 09-09-2014, 08:23 AM
  2. Replies: 52
    Last Post: 05-11-2013, 03:17 PM
  3. Recommend me some good program books
    By runeveryday in forum C Programming
    Replies: 1
    Last Post: 07-12-2011, 09:22 PM
  4. I don't want to write a code I don't understand ..!!
    By bchaib in forum C Programming
    Replies: 28
    Last Post: 12-19-2007, 04:29 AM
  5. How those people write books?
    By Nutshell in forum A Brief History of Cprogramming.com
    Replies: 9
    Last Post: 02-18-2002, 06:22 AM

Tags for this Thread