Search This Blog

Sunday, 23 August 2020

getline and write function...

 #include<iostream>

using namespace std;

int main()

{

int i;

char ch[30];

cout<<"Enter the string ";

cin.getline(ch,30);

cout<<"\n\n";

cout.write(ch,20);

cout<<"\n";

cout.good();

cout<<"\n";

cout.bad();

cout<<"\n";

cin.fill();a

cout<<"\n\n\nName : "<<ch;

return 0;

}


No comments:

Post a Comment

Search This Blog

Contact Form

Name

Email *

Message *

Popular Posts