Algorithm & Programming – 9th Meeting

Definisi File, record dan penyusunnya :

File is a collection of record
Record is a collection of field
Field is a block of byte
Byte is collection of bit

Definisi Streams 

Stream
-Standard input stream (stdin)
-Standard output stream (stdout)
-Standard error stream (stderr)
Text FILE disimpan dalam format ASCII
Binary File : data yang hanya dapat dibuka oleh system (kata2x atau hurufnya di .txt acak [cryptography])
Penulisan
FILE *fp;
fp = fopen(“____.txt”,”_”);      [blank pertama itu nama dari txt, blank ke 2 itu untuk tipe atau modenya(w,r,a,..)]
statement;
fclose(fp);        [harus ditutup agar bisa digunakan untuk aplikasi lainnya atau .txtnya digunakan terus]
fgetc = ambil 1 char dr file.txt
fputc = taruh 1 char ke file.txt
fscanf = baca file.txt
fprintf = tulis ke file.txt
fwrite = menulis ke file sebanyak n size
fread = membaca dr file sebanyak n size
feof = membaca terus menerus sampai file habis

About adrianjsj

18 | Binusian 2019 | Game Application Technology | Devoted to Jesus | No Other Name | Dota 2 Semi-Pro player | From 94 to 62
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

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