qc.hlp (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
EMPLOYEE.C
                                             Up Contents Index Back
────────────────────────────────────────────────────────────────────────────
 
/* EMPLOYEE.C: Demonstrate structures. */
#include <stdio.h>
#include <string.h>
 
struct employee
{
   char name[10];
   int months;
   float wage;
};
 
void display( struct employee show );
 
main()
{
   struct employee jones;
 
   strcpy( jones.name, "Jones, J" );
   jones.months = 77;
   jones.wage = 13.68;
 
   display( jones );
}
 
void display( struct employee show )
{
   printf( "Name: %s\n", show.name );
   printf( "Months of service: %d\n", show.months );
   printf( "Hourly wage: %6.2f\n", show.wage );
}