Binary Files - To translates a text file containing double values into a binary file • while(fscanf(in"%lf"&d == 1 •

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Binary Files Read and Write size_t fread(void *buf, size_t elSize, size_t count, FILE *in); reads from the file in up to count objects, each of size elSize and stores them in the block pointed to by buf
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Binary Files Read and Write
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: To translates a text file containing double values into a binary file: • while(fscanf(in, "%lf", &d) == 1) • if(fwrite(&d, sizeof(double), 1, out) != 1) • To translate a binary file of double data into a text file:...
View Full Document

This note was uploaded on 02/18/2012 for the course CS 240 taught by Professor Rego during the Fall '08 term at Purdue University-West Lafayette.

Page1 / 2

Binary Files - To translates a text file containing double values into a binary file • while(fscanf(in"%lf"&d == 1 •

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online