Advertisement
morty0505

Untitled

Nov 26th, 2016
314
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. FILE **files = malloc(sizeof(FILE *) * n);
  2.  
  3.  
  4. int cols = 3;
  5. int rows = n/cols;
  6.  
  7. int files_index = 0;
  8. for(int row_nr = 0; row_nr < rows; row_nr++) {
  9. for(int i = row_nr; i < n; i += rows) {
  10. files[files_index++] = fopen(nameArray[i],'r');
  11. }
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement