Print Name __________________________
Signature __________________________
Recursive Strings Lab
Individual Assignment
15 Points
| ///////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////// // // // RecursiveStrins.cpp // // // // Purpose : // // // // Written By : Environment : // // Date : Compiler : // ////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////// // -----------------------------------
Includes ----------------------------------
long int StrLen (char String[]);
// Recursive --> same functionality as strlen
main (int argc, char *
argv[])
cout <<
"-------------------------------------------------------------------\n"; cout << "Enter Your
Full Name : ";
long int StrLen (char String[])
// same functionality as strlen
void StrOut(char String[], bool
CarriageReturn)
void StrCopy(char NewStr[],
char CopyStr[]) // same functionality as strcpy
} |
3] Write functions StrLen and StrCopy without calling any standard C++ functions. You may call your own functions. StrLen must be recursive. Extra credit if StrCopy is recursive.
4]Do the following when program is complete.
g++ RecursiveStrings.cpp
-o RecursiveStrings
<--
Binary File Will Be Called RecursiveStrings
- Not a.out
RecursiveStrings > Output.txt
<--
Runs the program and dumps output into file Output.txt
A] Divider
B] Copy of this assignment sheet. Using an ink pen, print your name and sign this lab at the top.
C] Listings RecursiveStrings.cpp and Output.txt
D] Disk Containing RecursiveStrings.cpp and Output.txt
E] Divider