PDA

View Full Version : need help understanding assignment question



nite owl
April 17th, 2009, 05:49 AM
Hi I've been procrastinating about this assessment for a couple weeks since I've had a few others 2 complete before this is due.

I am not asking for help on how to do it, I just need some help on actually understanding what the question is asking me to do.

My understanding is that all the assessment wants is for me to write a program that looks into a text file of characters or chars and lets the user to be able to pick and choose characters he/she wants to replace .ie. replace a 'c' with an 'i'. Have I understood it correctly? Heres the question:

################################################## #############
Design and implement a C program that replaces characters in a file.
The file, list of characters to replace and the replacement characters must be supplied via command line arguments.
The file must be updated in place, you may not use a temporary file of any kind.
Your program should assume that all occurrences of the replace characters are to be changed. You should also provide
functionality to replace the first occurrence of the replace characters, this option should be activated by supplying the on
the command line the option -f.
You are required to provide a solution to this problem and a manual for your solution.
################################################## ###############

Again I am not asking for help with my homework, I am just looking for some help on understanding what the question wants me to do.

ghostdog74
April 17th, 2009, 05:56 AM
Have I understood it correctly?
yes. not just one char but characters. anyway, you don't you ask your mentor or supervisor? you should be able to get clearer picture

lisati
April 17th, 2009, 05:59 AM
My understanding is that all the assessment wants is for me to write a program that looks into a text file of characters or chars and lets the user to be able to pick and choose characters he/she wants to replace .ie. replace a 'c' with an 'i'. Have I understood it correctly?

That's pretty close to how I understand it. There are a couple of other things that might test your ingenuity but I think you're on the right track.