Program 31 Objective: Write A Program Tocompare The Content of Two Files and Whether They Are Same or Not
Program 31 Objective: Write A Program Tocompare The Content of Two Files and Whether They Are Same or Not
OBJECTIVE: WRITE A PROGRAM TOCOMPARE THE CONTENT OF TWO FILES AND WHETHER THEY ARE
SAME OR NOT.
#include <stdio.h>
#include <string.h>
if (f_ptr_1 == NULL)
if (f_ptr_2 == NULL)
fclose (f_ptr_1);
return 1;
fclose (f_ptr_1);
fclose (f_ptr_2);
return 0;
fclose (f_ptr_1);
fclose (f_ptr_2);
le.");
OUTPUT:
OBJECTIVE: WRITE A PROGRAM TO TO CHECK WHETHER A GIVEN WORD EXISTSING AFILE OR NOT.IF
YES THEN FIND THE NUMBER OF TIMES IT OCCURS.
#include<stdio.h>
void main()
{
FILE* filePointer;
int wordExist=0;
char search[100];
scanf("%s",search);
char line[bufferLength];
if (ptr != NULL)
wordExist=1;
break;
fclose(filePointer);
if (wordExist==1)
else
OUTPUT:
Word exists.