Pages
Categories
Archives
Meta
Pages
Categories
Archives
KEEP CALM AND CHEERS WITH US
Posted in: Uncategorized by wreckcs19 on January 6, 2016
ALGORITMA PROGRAMMING “STREAM & BUFFER”
DATE : Wednesday, 17 Desember 2015
File and Stream
Definition Stream:
-To keep key in data from keyboard need to be saved at secondary storage device as a data file
-Stream is a sequence of character
There are 3 standard streams activated in C
-Standard Input Stream
-Standard Output Stream
-Standard Error Stream
File Definition:
-File is a collection of record
-Record is a collection of field
-Field is a block of byte
Buffer Area
Buffer Area Definiton:
-Buffer area is part of the memory used as a temporary space before data moved to a file
-Also known as stream pointer
Open File
Opening a File Using fopen() :
-FILE*fopen(const char*filename, const char*mode);
-fopen() return a pointer to the start of a buffer area
-NULL will be returned if file unable to open.
contoh syntax :
- Open File
Membuka File menggunakan fopen ():
FILE *fopen (const char *filename, const char *mode);
contoh mode :
“r” membuka file untuk dibaca.
“w” membuat file untuk ditulis.
“A” membuka file untuk data append.
“r+” membuka file untuk membaca / menulis.
“w+” membuat file untuk membaca / menulis.
“a+” membuka file untuk membaca / menambahkan
“rb” membuka File (binary) untuk dibaca.
“wb” membuat file (binary) untuk menulis
SALAM CyberSecurityORCyberSecurityCommunity ^_^
HACK PASSIONATELY
ACT RIGHTEOUSLY
THANKSSSSS
No Comments »
No comments yet.
RSS feed for comments on this post. TrackBack URL