steamengines

LAB 1 (COSC 1040)

Sep 14th, 2016
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.47 KB | None | 0 0
  1. #include<stdio.h>
  2. #include<stdlib.h>
  3. #include<string.h>
  4.  
  5.  
  6.  
  7. int main()
  8. {
  9.     struct employee
  10.     {
  11.         char name[15];
  12.         int ID;
  13.     };
  14.  
  15.     struct customer
  16.     {
  17.         char name[15];
  18.         int ID;
  19.         double balance; //Might need to be a float data type
  20.     };
  21.  
  22.     char file[25];
  23.    
  24.     printf("What is the name of the file you wish to open? \n");
  25.     scanf("%s", file);
  26.  
  27.     FILE *fopen(const char * file, const char * r);
  28.  
  29.     char *fgets(char *buf, int n, FILE *fp);
  30.    
  31.    
  32.     getchar();
  33.     return 0;
  34. }
Advertisement
Add Comment
Please, Sign In to add comment