Back to DFS's C Page


OAC Problem Set I

Strings Problem

For this problem (or set of problems), you are to write a program to emulate each of the following Turbo Pascal functions/procedures: Length(), Pos(), Delete(), Insert() and Copy().

Include all of the following features in each program.

  1. All items which would be used as parameters are to be hard-set in variables.
  2. The string "Sick over the ..." is stored in a variable local to main().
  3. main() prints out the values which would serve as parameters for the Turbo Pascal function/procedure.
  4. main() prints out the outcome of the operation.
  5. Bulletproofing is essential.

N.B. Information about the Turbo Pascal functions/procedures can be obtained from either textbooks or the editor's online help.


© DFStermole 2001
Created 1 Oct 01