Advertisement
Guest User

Untitled

a guest
Oct 22nd, 2019
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <iosteam>
  3. #include <stdlib.h>
  4. #include <string.h>
  5.  
  6.  
  7. //leggi file
  8.  
  9.  
  10. //3 comandi shell
  11. void leggi_file(int * num_rot; int * num_righe; int * matrix){
  12.  
  13. char * command = malloc(sizeof(char)*50);
  14.  
  15. strcpy(command, "head -n 1 test.txt")
  16. &num_rot =(int)system(command);
  17.  
  18. strcpy(command, "head -n 2 test.txt")
  19. &num_rot =(int)system(command);
  20.  
  21. printf("num rot: %d", &num_rot);
  22. }
  23.  
  24.  
  25. //ruota - rotazioni modulo 4
  26.  
  27. //output
  28.  
  29. int main() {
  30. int * num_rot;
  31. int * num_righe;
  32. int * matrix;
  33.  
  34. leggi_file(num_rot, num_righe, matrix);
  35.  
  36.  
  37. return 0;
  38. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement