|If it's a professional app (which i feel is not the case), then you can use xml with four nodes and data for each node.
If you are making for learning purposes, then just insert a unique tag say <!!!TAG - 001!!!> and then dump all data for tag1. Similarly for tag2,3..
while reading data, search for <!!!TAG - 001!!!> and read data till you reach EOF or another TAG.
Now regarding searching of tags, use something like
while(*fp != '<') fp++;
if(fp == EOF) byebye.
if(read_next_9_characters() != "!!!TAG - ")
then read tag number and check for "!!!>" if it's present.
Read all data for current tag number and store.
Similarly for searching for another tags.
I am sure you can find many articles on searching string in a file in C/C++
An example is here [<a href="http://www.tutorialized.com/view/tutorial/Searching-for-a-string-in-a-File/9990" target="_blank">^</a>]
Other languages like python have built-in search capabilities for regular expressions search which makes this task very easy. other members can put more light on that.