Guest User

Untitled

a guest
Apr 19th, 2018
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.30 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <string.h>
  3.  
  4. int main()
  5. {
  6.     char strings[100][256];
  7.     char current = 0;
  8.  
  9.     FILE* f = fopen("file.extension");
  10.  
  11.     while(!feof(f)){
  12.         fscanf(f, "%s", strings[current]);
  13.         if(strcmp(strings[current] + strlen(strings[current]) - 3, "ova") == 0)
  14.             ++curent;
  15.     }
  16.  
  17.     fclose(f);
  18. }
Add Comment
Please, Sign In to add comment