Differences

This shows you the differences between two versions of the page.

Link to this comparison view

programare-cc:laboratoare:11 [2023/12/20 13:50]
mihai.nan [Problema 3B]
programare-cc:laboratoare:11 [2023/12/20 14:41] (current)
mihai.nan [Problema 1 (Rezolvata)]
Line 61: Line 61:
     ​     ​
     pFile = fopen("​myfile.txt"​ , "​r"​);​     pFile = fopen("​myfile.txt"​ , "​r"​);​
-    if (pFile == NULL)+    if (pFile == NULL) {
         printf("​Nu s-a putut deschide fisierul"​);​         printf("​Nu s-a putut deschide fisierul"​);​
 +        return 1;
 +    }
     ​     ​
     while (fgets(buffer,​ BUFMAX, pFile) != NULL) {     while (fgets(buffer,​ BUFMAX, pFile) != NULL) {
Line 68: Line 70:
     }     }
     fclose(pFile);​     fclose(pFile);​
 +    return 0;
 } }
 </​code>​ </​code>​
Line 177: Line 180:
 ==Exemplu== ==Exemplu==
 Aplicăm algoritmul de codare pe fişierul input.txt şi vom obţine un fişier output.txt. Aplicăm algoritmul de codare pe fişierul input.txt şi vom obţine un fişier output.txt.
-./​executabil tabela_de_codare.in input.txt output.txt+ 
 + 
 +**./​executabil tabela_de_codare.in input.txt output.txt**
  
 ^ Intrare (input.txt ) ^ Ieşire (output.txt) ^ ^ Intrare (input.txt ) ^ Ieşire (output.txt) ^
programare-cc/laboratoare/11.1703073047.txt.gz · Last modified: 2023/12/20 13:50 by mihai.nan
CC Attribution-Share Alike 3.0 Unported
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0