hw5 - CS1372 Homework 5 Assigned: Due: Friday September 29,...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
CS1372 – Homework 5 Assigned: Friday September 29, 2006 Due: Wed, October 4, 11:59pm. For this assignment, we will perform various operations on arrays of characters (“strings”) and arrays of character pointers. A skeleton hw5.cpp program is provided, along with the associated MSVC project files. The assignment has three parts. 1) Implement subroutine StringParse, which parses an input string into individual “tokens”, and prints each token on a separate line. A token is defined as a sequence of characters between one or more “separators”. A separator is defined, in this case to be either a space or the end-of-string zero character. For example, given an input string “This is a test”, your StringParse should print: Token 0 is This Token 1 is is Token 2 is a Token 3 is test 2) Implement subroutine StringCat, which takes a pointer to an array of strings as an argument, and produces a single string that is the concatenation of all of the input string. The input array of strings has the null pointer “NULL” as the last value. You should limit the resulting concatenated string to no more than
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 06/17/2008 for the course CS 1372 taught by Professor Smith during the Fall '07 term at Georgia Institute of Technology.

Ask a homework question - tutors are online