#include<iostream.h>
#include<conio.h>
#include<string.h>
using namespace std ;
char*remove(char arry_1[], int size, int &a)
{
//char point [size];
char choice;
cout<<" Which character U want to remove Baby : ";
cin>>choice;
cout<<" \n\n\n Your Result After RemovinG Your Character is == ";
for( int i=0 ; i<size ; i++)
{
if (arry_1[i] != choice )
{
arry_1[a]=arry_1[i];
a++;
}
}
return arry_1 ;
}
int main ()
{
int a=0;
string str ;
cout<<"\n\n EnteR UR Word == ";
cin>>str;
int size=str.size();
char arry_1[str.size()], *ptr;
for(int i=0 ; i<str.size() ; i++)
{arry_1[i]=str[i];}
ptr =remove(arry_1,size,a) ;
for(int y=0 ; y<a ; y++)
cout<<ptr[y];
cout<<"\n\n\n";
}
- Blogger Comment
- Facebook Comment
Subscribe to:
Post Comments
(
Atom
)
0 comments:
Post a Comment