Tuesday, July 28, 2009

Pls help me?

i want file programe in c following Methods


pls sample programe








getc( fptr) à Reads a character from the file


putc (char, fptr) à Writes a character to the file


fputs (char[] , fptr) à Writes a line to the file


fgets (fptr, size, char[]) à Reads a line from the file


fprintf (fptr, “control string”, variable) à writes formatted input to the file


fscanf (fptr, “control string”, variables) à Reads formatted output to the screen


fread (struct variable, size of var, records , file ptr) à Reads a set of data like structure


fwrite(struct variable, size, record, fptr) à writes a set of data like structure


feof (fptr) à Checks whether we are at the end of the file or not


ftell (fp) à Tells the current cursor position


fseek (fp, (long) offset, position) à sets the cursor position


where offset à specifies the size of the cursor to be moved


position à 0 – from beginning


1 – from current place

Pls help me?
The input data for a program in real time always large and uses a large amount of data.The use of printf or scanf functions is not efficient programming as large input data reading becomes tedious .It is always advised to use files to store data on disks so it is never lost even if power is lost.There are quite good books like G.Balaguruswamy c.programming and let us c .......etc to start with .Use can easily know usage of commands with the sample program in those commands..............

online survey

No comments:

Post a Comment