Thread: C program help

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Feb 2021
    Posts
    1

    Exclamation C program help

    Hi,

    I am a beginner to C and have been given the following task to complete, I some vague ideas on how to go about doing it and really need help.

    Write a program to keep a record of dogs at a vet. Each dog has the followinginformation: Name, Height, Age and Breed.

    (iii) Write functions to do the following (all functions must have a void return type, thereforarguments should be pointers):
    - Print out the name, height, age and breed of a dog when the dogstruct is provided as an argument.
    - Change the age of a dog when a new age and the dog struct isprovided.
    - Change the name of a dog when a new name and the dog struct isprovided.
    - Change the breed of a dog when a new name and the dog struct isprovided.

    (iv) Using the functions described in (iii), carry out the following tasks:- Change Dog3’s name to “Lando”.
    - Change Dog2’s age to 10.
    - Change Dog1’s breed to “Husky”.
    - Print out the name, height, age and breed of a dog when someonetypes in the dog ID into the console window.
    Attached Images Attached Images C program help-screenshot-2021-02-08-1-03-50-am-jpg 

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 1
    Last Post: 01-25-2020, 05:06 PM
  2. Replies: 7
    Last Post: 03-15-2016, 06:35 AM
  3. Replies: 4
    Last Post: 12-21-2015, 07:17 AM
  4. Replies: 2
    Last Post: 09-09-2014, 02:36 PM
  5. Replies: 1
    Last Post: 03-03-2009, 04:47 PM

Tags for this Thread