[box]

Ans

void COUNT( )

{

ifstream Fil(“DIARY. TXT”);

char STR[10];

int count = 0;

while(!Fil.eof( ))

{

Fil>>STR;

if(strcmp(STR,”Me”)==0||strcmp(STR,”My”)==0)

count++;

}

Cout<<“Count of Me/My in file :”<<count<<end1;

Fil.close( ); //Ignore

}

[/box]
Rate Us
error: Content is protected !!