Reading frm text file

hi,

Actually i have a text file which contain data in the following format:
----------------------------------
black pepper
john barber
steven johnson

------------------------------------
and the list goes on.

I'm writing a c program that reads the text file and output the following on the console:
-------------------------------------
othername: black
surname: pepper

othername: john
surname: barber:

othername: steven
surname: johnson

--------------------------------------
and so one.

could anyone please post the source code for me...

looks like homework

no its a classwork
just post the answer if u know it.

We don't Know sir !!

no sir we don't know the answer :frowning:
now please don't punish us :eek:

Its ok vidya, anyway I already got the solution. It was just a few lines of codes.
If you want I can post it for you, since you don't know the answer? Let me know if you are interested?!
By the way next time if you don't know an answer,don't waste your time replying.
reply only if you know the solution.

ok??
Bye. c you.:smiley:

kanexxx, please be patient in your replies to other members of the forum. See #2 of The UNIX and Linux Forums - Forum Rules

Thanks.

Ok.. but she was provoking me.

Alright. I have taken care of that. If you find any more posts of that nature, please do report those. One of the moderators will handle it appropriately.

Thanks again for your contribution to the forums.

No problem boss. :slight_smile:

Closing this thread to stop further violation of rules.