Category : C++ Source Code
Archive   : C_ALL.ZIP
Filename : TI719.ASC

 
Output of file : TI719.ASC contained in archive : C_ALL.ZIP







PRODUCT : Borland C++ NUMBER : 719
VERSION : 2.0
OS : DOS
DATE : August 12, 1992 PAGE : 1/1

TITLE : Getting the Size of a File




/***************************************************

This program shows how to get the size of a file.

***************************************************/

#include
#include
#include
#include

int main(void)
{
int handle;
char buf[11] = "0123456789";

/* create a file containing 10 bytes */
handle = open("DUMMY.FIL", O_CREAT);
write(handle, buf, strlen(buf));

/* display the size of the file */
printf("file length in bytes: %ld\n",
filelength(handle));

/* close the file */
close(handle);
return 0;
}

DISCLAIMER: You have the right to use this technical information
subject to the terms of the No-Nonsense License Statement that
you received with the Borland product to which this information
pertains.


















  3 Responses to “Category : C++ Source Code
Archive   : C_ALL.ZIP
Filename : TI719.ASC

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/