2010_F18/wk8/lab8.cpp
The purpose of this lab is to practice cstrings (character arrays),
character testing, and character conversion. Function prototypes and
function main is given to you. Your task will be to complete
the function definitions to the following:
int my_strlen(const char[]); - this function will NOT
call cstring library's strlen function. You will count the
number of printable characters within the passed character array and
return the count.
void my_reverseString(char[], const char[], int); - this function will
pass a character array to store the reversed string of the second character
array, and an integer for the length of the string.
void testCharsInString(const char[], int); - this function will traverse
the entire character array. Output each character value on it's own line
and state whether the value is a letter, digit, punctuation, space, or
a non-printable character.
void my_tolowerString(char[], int); - this function will convert the passed
character array to all lower case character values.
Enter a word: RaCeCar You entered: RaCeCar length: 7 mylength: 7 RaCeCar reversed is raCeCaR Converting all chars to lowercase: racecar r is a letter a is a letter c is a letter e is a letter c is a letter a is a letter r is a letter Do you want to continue (YES/NO)? yes Enter a word: 123aBc!@# You entered: 123aBc!@# length: 9 mylength: 9 123aBc!@# reversed is #@!cBa321 Converting all chars to lowercase: 123abc!@# 1 is a digit 2 is a digit 3 is a digit a is a letter b is a letter c is a letter ! is punctuation @ is punctuation # is punctuation Do you want to continue (YES/NO)? No Exiting Program ...
Show me your completed code in class or submit
via depository directory 2010_F18/wk8/lab8.cpp