tugas
- Tugas (5)
- Uncategorized (1)
kalender
| M | T | W | T | F | S | S |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | ||||
| 4 | 5 | 6 | 7 | 8 | 9 | 10 |
| 11 | 12 | 13 | 14 | 15 | 16 | 17 |
| 18 | 19 | 20 | 21 | 22 | 23 | 24 |
| 25 | 26 | 27 | 28 | 29 | 30 | 31 |
File and streams
Posted in: Uncategorized by firmandr on January 6, 2016
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<stdio.h>
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