www.delorie.com/djgpp/doc/libc/libc_349.html   search  
libc.a reference

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

fread

Syntax

 
#include <stdio.h>

size_t fread(void *buffer, size_t size, size_t number, FILE *file);

Description

This function reads size*number characters from file to buffer.

Return Value

The number of items of size size read, or less if there was an error.

Portability

ANSI/ISO C C89; C99
POSIX 1003.2-1992; 1003.1-2001

Example

 
int foo[10];
fread(foo, sizeof(int), 10, stdin);


  webmaster   donations   bookstore     delorie software   privacy  
  Copyright 2004   by DJ Delorie     Updated Apr 2004