Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:

prg-sem-sp / 1 / 6

.cpp
Скачиваний:
11
Добавлен:
28.03.2015
Размер:
502 б
Скачать
/* ‚ ⥪бв®ў®¬ д ©«Ґ ­ ©вЁ бЄ-Є® а § ўбваҐз Ґвбп "ll"*/
#include<conio.h>
#include<stdlib.h>
#include<string.h>
#include<stdio.h>
#include<alloc.h>

void main()
  {
  char *str=(char *)malloc(80),*sl="ll";
    int i=0;
    FILE *fp;
    if((fp=fopen("c:\\t.txt","rt"))==NULL)
	{
	  printf("\n Error");
	  exit(1);
	}
    fread(str,80,1,fp);
    while((str=strstr(str,sl))!=NULL)
	 {i++;str+=strlen(sl);}
    printf("\n ‚бваҐз Ґвбп %d а §( ) ",i);
    getch();
    fclose(fp);
  }
Соседние файлы в папке 1