#include <stdio.h>

int main() 
{
   FILE *f;
   char buff[255];

   // Burda yazma modunda dosyamızı açıyoruz bunu "wb" olarak "Write Binary" olarakda acabilirdik veya "a+" bu modda ise kaldığımız yerden devam edebiliriz. echo "merhaba" >> /temp/test.txt gibi
   f = fopen("/temp/test.txt","w"); 



   fputs("Test say hello", f); 


   // burda dosyası mutlaka kapamalıyız eğer biz yapmazsak return fonksiyonu veya main son  parantezi "}" bu alanı işletim sistemine geri tahsis edecektir.
   fclose(f); 



   // Read yani okuma modunda açıyoruz dosyamızı yazma işlemi yapamayız sadece okuyacağımızı belirttik
   f = fopen("/tmp/test.txt", "r");



   // f dosyamızdan 255 karekter buff char değişkenimeze okuma yapıyoruz.
   fgets(buff, 255, (FILE*)f); 
   
   fclose(f);

}
Categories: C language

662 Comments

Williamsex · 04/12/2023 at 22:25

cost of amoxil

Joerot · 05/12/2023 at 00:43

zithromax strep throat

Ortopedich_yhma · 05/12/2023 at 02:57

Непревзойденный комфорт с ортопедическими стельками
aetrex стельки https://ortopedicheskie-stelki-2023.ru.

Maryrot · 05/12/2023 at 03:26

order cheap accutane

CurtisHycle · 05/12/2023 at 03:32

neurontin tablets

Zakrot · 05/12/2023 at 04:52

generic for colchicine

Leave a Reply

Avatar placeholder

Your email address will not be published. Required fields are marked *