Already have an account? Get multiple benefits of using own account!
Login in your account..!
Remember me
Don't have an account? Create your account in less than a minutes,
Forgot password? how can I recover my password now!
Enter right registered email to receive password!
Program is to replace every occurrence of in a string:
Program is to replace every occurrence of c1 in string with c2 and have function return the no. of replacement
int replace(char *s,char c1,char c2);
void main()
{
clrscr();
char *s,c1,c2;
int ans;
cout<<" enter a string ";
gets(s);
cout<<" enter the string to be searched ";
cin>>c1;
cout<<" enter the string to be replaced ";
cin>>c2;
ans=replace(s,c1,c2);
cout<<" the no. of replacement made "< cout<<" the string after replacement being made :"< } int replace (char *s,char c1,char c2) { int i=0; int count=0; while(s[i]!= NULL) { if (s[i]==c1) { s[i]=c2; count++; } i++; } return count; }
cout<<" the string after replacement being made :"<
}
int replace (char *s,char c1,char c2)
int i=0;
int count=0;
while(s[i]!= NULL)
if (s[i]==c1)
s[i]=c2;
count++;
i++;
return count;
Is it possible to have Virtual Constructor? If yes, how? If not, Why not possible?
how to create database of faculty database......... send me with program
There are ''n'' ants on a ''n+1'' length rod. The ants are numbered from 1 to n and are initially placed at positions starting from position 1 till position n. They are moving eith
Explain a class to model a banking system. The function members should allow initializing the data members, a query to facilitate for account and a facility to deposit and with
a) Define an Asset base class that provides the following method: class Asset { public: virtual double getValue()=0; }; This will be the base class for both stock an
#questio A charitable organization wants to design a special ATM machine to be used by needy people. The association supplies the needy person with a pin number to be able to use
Manipulators There are several classes in the iostream.h header file. One of them is ios class. This class stores the format state. For example, some bits explain the base in w
write a program in c language to implement stacks in a single array
Shell sort - C Program: Write a program to define shell sort. void main() { //program for sorting by select sort int a[20],i,k,j,n; clrscr();
(i) Vilsmeir reaction
Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!
whatsapp: +1-415-670-9521
Phone: +1-415-670-9521
Email: [email protected]
All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd