|
C Program To Display Disk Space in Dos System |
#include
#include
#include
void main(void)
{
struct dfree diskinfo;
long disk_space;
clrscr();
getdfree(3, &diskinfo);
disk_space = (long) diskinfo.df_avail * (long) diskinfo.df_bsec * (long) diskinfo.df_sclus;
printf("Available disk space %ld\n", disk_space);
clrscr();
}
Sample Output :
Available disk space 215359488
|
|
|