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;
Train Station C++ Program A C++ program that provides a simple text based interface that will allow a user to create, edit, search, or delete a train schedule. The program will m
Deliverables: you are required to upload your c code in the assignment dropbox set in Moodle. You are supposed to work with Linux gcc compiler and pico editor for compiling via the
Need assignment help What's the order that local objects are destructed?
Classify computer system according to capacity. How they are different from computers according to the classification of technology. Provide comparative study also.
Homework – Chapter 5 – Bowling Scores 33. Write a complete C++ program to do the following: The main program reads in and prints three bowling scores, score1, score2, and score
Spider webs have two types of silk, sticky silk and strength silk, spiders do not move on the sticky silken threads only on the strength threads. Assume one type of spider creates
c program to count the number of occurances of the string in padovan''s string
how to write
I want a PROGRAM - Facebook auto like system to increase fans to different fanpage It has in a program that take Facebook mails and passwords from a excel file (.xlsx) for examp
Define the Increment and Decrement Operators in c language? C offers two special operators -and ++ called decrement and increment operators respectively and these are unary ope
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