Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Скачиваний:
1
Добавлен:
18.02.2023
Размер:
652 б
Скачать
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

extern void search_words(char *file1, char* file2)
{
	FILE *fin, *fout;
	char string1[50], string2[50];
	if((fin = fopen(file1, "r")) != NULL)
	{
		while(!feof(fin))
		{
			if(fgets(string1, 50, fin) != NULL)
			{

				if((fout = fopen(file2, "r")) != NULL)
				{
					while(!feof(fout))
					{
						if(fgets(string2, 50, fout) != NULL)
						{
							string1[strcspn(string1, "\r\n")] = 0;
							string2[strcspn(string2, "\r\n")] = 0;
							if(strcmp(string1, string2) == 0)
								printf("%s;\n", string1);
						}
					}
					fclose(fout);
				}

			}
		}
		fclose(fin);
	}
	return;
}
Соседние файлы в папке static
  • #
    18.02.20238.73 Кб1a.out
  • #
    18.02.20238.73 Кб1a1.out
  • #
    18.02.20238.73 Кб1a2.out
  • #
    18.02.20232.68 Кб1libstatic.a
  • #
    18.02.2023318 б1main.c
  • #
    18.02.2023652 б1static.c
  • #
    18.02.20232.53 Кб1static.o