File
by joydaniel on 6/01/2016File and streams
File definition
Definisi
Collection of record
Record is a collection of field
Terdiri tadi blok byte
Byte = kumpulan bit
Text file = teks format / ascii file
Ascii = american standart
Binary File
Lebih kompleks dan ga bisa diedit
Buffer area
FILE *fp;
Openfile > suka keluar
FILE *fopen
R = read
W = write
A = append = tambahin data
R+ = buka file
W+ = buat baru
Rb= read binary
Wb = write binary
Close file
Int fclose(FILE*stream);
Fclose() define at
Fclose = menutup agar aplikasi lain bisa berjalan
EOF= end of file = return -1
Int fclose all = menutup semua
~fgetc(stdin)
Random ambil 1karakter
Fputc(‘a’, stdout)
Tulis 1 karakter
Input file
Fscanf()
Input data
Fprintf()
Output file
Print with format
~Fwrite
Menulis 1 blok data
Equals to(gets)
Fread
Ngambil data sesuai ketentuan karakter
Feof
File end of file
Reurn 0 bila data belum habis
Return 1 kalau data habis
Stream
Urutan dari suatu karakter
No comments yet.