C/Strumień: Różnice pomiędzy wersjami

Usunięta treść Dodana treść
Linia 157:
[[C/Ćwiczenia dla początkujących|Ćwiczenia]]|
}}
 
Przykład:<ref>[https://stackoverflow.com/questions/8288906/how-would-i-create-a-file-output-stream-in-c-like-stdout stackoverflow question: how-would-i-create-a-file-output-stream-in-c-like-stdout]</ref>
 
<syntaxhighlight lang="c">
#include <stdio.h>
 
int main(void) {
 
int filedes = 3; // New descriptor
FILE *stream = fdopen (filedes, "w"); //
fprintf (stream, "hello, world!\n");
fprintf (stream, "goodbye, world!\n");
fclose (stream);
 
return 0;
}
</syntaxhighlight>
 
=Pomoc=