#include <stdio.h>
#include <stdlib.h>

int main(int argc, char *argv[]) {
	char count;
	char z,x;
	int intz;
	FILE *file;
	file=fopen("text.txt","r");
	if(file==NULL) return 1;
	printf("Enter char to search in file:\n> ",file);  // Как здесь задать вывод имени файла file, заданного на две строчки выше?
	scanf("%c",&x);
//	FSymCnt(file,x);
	while(fgets(z,1,file)){
		if (strsrt(x,z)) count++;
		printf("%c",z);	
	}
	printf("\nEntered char counted %d times.\n",count);

	fclose(file);
	return 0;
}