Logo 
Search:

C++ Programming Articles

Submit Article
Home » Articles » C++ Programming » BeginnersRSS Feeds

EXAMPLE OF WRITE FUNCTION

Posted By: Adalwen Fischer     Category: C++ Programming     Views: 3467

EXAMPLE OF WRITE FUNCTION.

Code for EXAMPLE OF WRITE FUNCTION in C++ Programming

# include <iostream.h>
# include <conio.h>
# include <string.h>

main()
{
    char str[20];
    clrscr();
    cout<<"PLEASE ENTER THE STRING:->";
    cin.getline(str,20);
    int n=strlen(str);
    for (int i=0;i<=n;i++)
    {
        cout.write(str,i);
        cout<<"\n";
    }
    for(i=n;i>0;i--)
    {
        cout.write(str,i);
        cout<<"\n";
    }
}
  
Share: 


Didn't find what you were looking for? Find more on EXAMPLE OF WRITE FUNCTION Or get search suggestion and latest updates.

Adalwen Fischer
Adalwen Fischer author of EXAMPLE OF WRITE FUNCTION is from Frankfurt, Germany.
 
View All Articles

 
Please enter your Comment

  • Comment should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].

 
No Comment Found, Be the First to post comment!