Code:
/******************************************************
Truncating a string by one each time
******************************************************/
#include <iostream>
#include <string.h>
#include <math.h>
#include <ctype.h>
int truncate(char[],int);
using namespace std;
int main()
{
char array[81]={"FoobarisGerman?"};
int size_of=strlen(array);
//call function truncate
//passing the array and it's size into it
truncate(array,size_of);
int stop;
cin>>stop;
}
//Declare function truncate
int truncate(char array[],int size)
{
int k=size;
for (int a=0; a<size; a++)
{
for (int b=0; b<k; b++)
{
cout<<array[b];
}
k=k-1;
cout<<""<<endl;
}
}