BINARY FILE HANDLING

VINOD KUMAR VERMA,PGT(CS), KV OEF KANPUR & SACHIN BHARDWAJ, PGT(CS), KV NO.1 TEZPUR

BINARY FILE HANDLING

Handling the file in the way computer understands

for more updates visit:

VINOD KUMAR VERMA,PGT(CS), KV OEF KANPUR & SACHIN BHARDWAJ, PGT(CS), KV NO.1 TEZPUR

Writing String to Binary file

? To store string in binary file, we must convert it to binary format either by prefixing the string with `b' or using the encode() function.

? For e.g.

We can use `a' in place of `w' for append

for more updates visit:

VINOD KUMAR VERMA,PGT(CS), KV OEF KANPUR & SACHIN BHARDWAJ, PGT(CS), KV NO.1 TEZPUR

Reading Binary file in String

We can observe, without decoding it will prefix text with `b'

for more updates visit:

VINOD KUMAR VERMA,PGT(CS), KV OEF KANPUR & SACHIN BHARDWAJ, PGT(CS), KV NO.1 TEZPUR

Program to create Binary file and store few records in it

for more updates visit:

VINOD KUMAR VERMA,PGT(CS), KV OEF KANPUR & SACHIN BHARDWAJ, PGT(CS), KV NO.1 TEZPUR

Accessing record randomly from Binary File

RECORD ORDER

for more updates visit:

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download