FSUTIL in turbo C Like DOS command
Page 1 of 1
FSUTIL in turbo C Like DOS command
#include<stdio.h>
#include<conio.h>
#include<dos.h>
main()
{
FILE *fp;
unsigned long check=0;
unsigned long size;
char fn[20];
clrscr();
printf("Enter file name: ");
scanf("%s",fn);
printf("Enter bytes");
scanf("%ld",&size);
fp=fopen(fn,"w");
while(size>check)
{
fputs(" ",fp);
check++;
}
printf("Compeleted");
getch();
}
AND IF YOU WANT THE LOOP WORKS FASTER THEN CAN TRY THIS:
#include<stdio.h>
#include<conio.h>
#include<dos.h>
main()
{
FILE *fp;
unsigned long check=0;
unsigned long size;
char fn[20];
unsigned long less;
clrscr();
printf("Enter file name: ");
scanf("%s",fn);
printf("Enter bytes");
scanf("%ld",&size);
less=size/48;
fp=fopen(fn,"w");
printf("%ld",less);
while(less>check)
{
fputs(" ",fp);
check++;
}
printf("Compeleted");
getch();
}
#include<conio.h>
#include<dos.h>
main()
{
FILE *fp;
unsigned long check=0;
unsigned long size;
char fn[20];
clrscr();
printf("Enter file name: ");
scanf("%s",fn);
printf("Enter bytes");
scanf("%ld",&size);
fp=fopen(fn,"w");
while(size>check)
{
fputs(" ",fp);
check++;
}
printf("Compeleted");
getch();
}
AND IF YOU WANT THE LOOP WORKS FASTER THEN CAN TRY THIS:
#include<stdio.h>
#include<conio.h>
#include<dos.h>
main()
{
FILE *fp;
unsigned long check=0;
unsigned long size;
char fn[20];
unsigned long less;
clrscr();
printf("Enter file name: ");
scanf("%s",fn);
printf("Enter bytes");
scanf("%ld",&size);
less=size/48;
fp=fopen(fn,"w");
printf("%ld",less);
while(less>check)
{
fputs(" ",fp);
check++;
}
printf("Compeleted");
getch();
}
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum