#include<iostream.h>
#include<conio.h>
#include<string.h>
void main()
{
clrscr();
char str[100];
int i;
cout<<"Enter the string:";
cin>>str;
for(i=0;i<=strlen(str);i++)
{
cout.write(str,i);
cout<<"\n";
}
getch();
}

#include<conio.h>
#include<string.h>
void main()
{
clrscr();
char str[100];
int i;
cout<<"Enter the string:";
cin>>str;
for(i=0;i<=strlen(str);i++)
{
cout.write(str,i);
cout<<"\n";
}
getch();
}
ReplyDeletenice article for beginners.thank you.
javacodegeeks
welookups