I suppose to create a main function that is used to invoke a function that displays the first character of a string on line 1, the first two characters on line 2 and so on until the whole string is displayed. The function takes in a parameter i.e. a char pointer. It handles the parameter as a C-style string i.e. a NULL terminated char array. It does not make use of the string class or its associated functions. In other words, the function examines every char element in the array until it encounters the terminating NULL character.
This is the main function:
int main() {
char string1[] = "Application of C++";
printPattern(string1);
}
How do i start to write the printPattern function?