Josif_tepe

Untitled

Aug 24th, 2026
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.54 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <string.h>
  3. #include <ctype.h>
  4. #include <math.h>
  5. int main(int argc, char * argv[]) {
  6.     FILE * in = fopen(argv[1], "r");
  7.     FILE * out = fopen(argv[2], "w");
  8.  
  9.     if(in == NULL || out == NULL) {
  10.         printf("Ne postoi datotekata\n");
  11.         return 0;
  12.     }
  13.  
  14.     char niza[2000];
  15.  
  16.     while(fgets(niza, 80, in) != NULL) {
  17.         for(int i = 0; i < strlen(niza); i++) {
  18.             printf("%c ", niza[i]);
  19.         }
  20.         printf("\n");
  21.  
  22.         // tuka pisuvame sto i da bara zadacata
  23.     }
  24.  
  25.  
  26. }
  27.  
Advertisement
Add Comment
Please, Sign In to add comment