Algoritma & Pemrograman – Pertemuan 8 (Review)

Okay, just to remind you readers, I won’t be explaining everything. If you wanna know more, search for it online, whether it be on Google or Wikipedia. It’s a pain to write too long, you know?

Moving on….

Today’s topic is about Files & Streams.

First up, Streams.

Stream is a sequence of characters. All input & output data are also considered to be a stream. C also see file as a stream. The purpose of a stream is for keeping key in data from keyboard need to be saved at secondary storage device as a data file.

When a C program runs, there are 3 types of streams that activated:

  1. Standard Input Stream
    • Controls input from keyboard.
  2. Standard Output Stream
    • Controls output stream to monitor.
  3. Standard Error Stream
    • Controls error messaging.

Note: Each stream is associated with a file.

Files is basically a massive collection of bits. I’ll tell you why: First, records is a collection of fields. Field is a collection of bytes. Third, bytes is a collection of bits.

So, in short, file is a record. The rest are self-explanatory.

For more explanations, please search it yourself, like I said before.

This entry was posted in BINUS University, Lessons, Review. Bookmark the permalink.

Leave a Reply

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