#include
int main(int argc, const char *argv[])
{
FILE *fp=fopen("./1.txt","r");
if(fp==NULL)
{
printf("读取失败\n");
return -1;
}
char c;
int len=0;
int len1=0;
while((c=fgetc(fp))!=EOF)
{
if(c=='\n')
{
len1++;
}
len++;
}
printf("%d %d\n",len,len1);
return 0;
}