Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calculating Checksum of a file

Status
Not open for further replies.

nitroprog

Technical User
Jun 18, 2003
4
PT
Hello,

I need a function in C language that calculates the checksum of a file. If you know were i can find it or if you have something that can help me, i appreciate it.
 
Since the guts of the problem is only a single line...

Code:
while ( (ch=fgetc(fp)) != EOF ) sum += ch;

Variable declarations and file opening/closing are left as easy exercises.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top