#include<stdio.h>
#include<stdlib.h>
#include<time.h>
int main(){
srand(time(0));
FILE* fp;
int i,ran;
fp=fopen("D://2.txt","r");
char c;
for(i=0;fscanf(fp,"%c",&c)!=EOF;++i)
fclose(fp);
fp=fopen("D://2.txt","r");
ran=rand()%i+1;
for(i=0;i<ran;++i){
fscanf(fp,"%c",&c);//这个C是程序里这一行数据的载体;
}
printf("第%d行的数据是%c",ran,c);
}