I believe what you really want to use is strstr()
This returns a pointer to the first occurrence of a string inside another string.
https://www.tutorialspoint.com/c_standard_library/c_function_strstr.htm
//while there are still lines to read , print if desired line has been read
while(fgets(temp, 150, f))
{
//if beggining mark is found print
if(strstr(temp, "****")!=NULL) printf("%s\n" , temp)
}
Note: 150 should be replaced by a MAXIMUM_LINE_SIZE variable. This variable should be populated with the maximum line size from the file that you are reading from. If a line is longer than this max size you could miss the desired string if "****" is over 150 characters into the line.