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;
Write a program that reads data into an array of type int. You must use an array. The numbers input are attendance numbers at a conference. Keep a running average, number of events
Write a program to find the area under the curve y = f(x) between x = a and x = b, integrate y = f(x) between the limits of a and b. The area under a curve between two points can b
Write a simple generic version of method isEqualTo that compares its two arguments with the equals method and returns true if they are equal and false otherwise. Use this generic m
Define the Conditional Operator in c language? The Simple conditional operator can be carried out with the conditional operators (? And :). An expression that makes use of the
The Shortest Job Next (SJN) algorithm queues processes in a way that the ones that use the shortest CPU cycle will be selected for running rst. Shortest remaining time rst algori
Problem: (a) Show the Java approach to event processing by explaining how event handling works in Java. Make use of a suitable example to support your answer. (b) Describe
big-m method operation reseach in progrmme c++..
I hv an assignment to do, I almost done. But i cant find whats wrong- my code is to make a simple calculator using function''s all 4 patterns. I did like this- #include int add
Queue - C++ program: Write a program to show the basic operations on queue. namespace stack { const int max_size = 200; char v(max_size); int top=0; void pu
code for K-means to form clusters
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: +91-977-207-8620
Phone: +91-977-207-8620
Email: [email protected]
All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd