fvvfdsvdsdsdssdvdsvdvsdvdvsdsvdvsdsvdsvdvsdvdsvdvsdsvdvs dsssssssssssssssssssssssssssssssssssssssssssssssssssssssss


  • : please i need help in this code:
    : a. Creating an array of employees
    : b. Asking the user how many employees records does he want to enter.
    : c. Modifying the input_data function to take the data of all
    : employees and fill them in the array
    : d. Modifying the output_data function to display the records of all
    : employees.

    This sounds suspiciously much like a homework question to me. The code below, I get the feeling it's part of the general question, or did you code it yourself?
    Anyway, I'll be nice and try 'n help you on your way:
    An array of a certain type is done by defining the variable name with square brackets at the end:
    char myArrayChar[20]; //Defines an array of 20 characters
    int myArrayInt[3]; //Defines an array of 3 integers
    What goes for the basic types (char, int, ...) goes for your structure. You can do question a) in much the same way.
    Prompting for input b) you should be able to do yourself, or at least copy, paste and modify some of the code from input_data.
    c) basically involves creating a loop around the input_data code, and also modifying it to write the data to the correct element of the array.
    d) can be modified in much the same way as done with c)

    Good luck, and I know I'm being harsh here, but if you post what you have achieved so far then we'd be happy to assist you. We just need you to put some effort into it too.
    Best Regards,

    The way I see it... Well, it's all pretty blurry
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


In this Discussion