kiem tien, kiem tien online, kiem tien truc tuyen, kiem tien tren mang
Tuesday, January 6, 2015

//đếm số ký tự trong 1 file văn bản
#include<stdio.h>
#include<conio.h>
#include<stdlib.h>
void main()
{
FILE *t;
int dem=0;
char c;
t=fopen("E:\\TOAN.TXT","a+");
if(t==NULL)
{
printf("khong mo duoc file\n");
exit(0);  //ket thuc chuong trinh
}
while (feof(t)==0)
{
c=getc(t);
dem++;
}
printf("co %d ki tu\n",dem);

fclose(t);
}


0 comments:

Post a Comment

domain, domain name, premium domain name for sales

Popular Posts