Sunday, 20 May 2012

Define Stdio.h, Fread (), Putchar ().

Stdio.h is one of the header files provided in library of ‘C’ language. It stands for Standard input output header file. It contains various input output function like scanf, printf etc. For using input output function we need to include stdio.h at the beginning of the program.

Fread ()
This function is related to file handling of ‘C’. It is used to read a block of data from a given file. It is also used to read one or more structure from a given file to a memory location.
The general syntax of fread function is:
Where ptr is a pointer to the location to receive the structure, size is the size in bytes of each structure to be read, nitems is the number of the structures to be read and fptr is the pointer to the file to be read.
Putchar ()
putchar() is a character handling function supported by C to output the values of character variables. The function putchar requires one parameter. We can use this function repeatedly to output a string of characters stored in an array using a loop. For example:
char name[6] = "PARIS"

No comments:

Post a Comment