Need help!! How to write a printPattern() function?
The function takes in a parameter i.e. a char pointer. It handles the parameter as a Cstyle string i.e. a NULL terminated char array. It does not make use of the stringclass or its associated functions. In other words, the function examines every char element in the array until it encounters the terminating NULL character.
Starting from this int main :
int main() {
char string1[] = "Application of C++";
printPattern(string1);
}
output should be something like this :
A
Ap
App
Appl
Appli
Applic
Applica
Applicat
Applicati
Applicatio
Application
Application
Application o
Application of
Application of
Application of C
Application of C+
Application of C++