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;
Changing Field width The printf() and scanf() functions from the standard library, use width specifier for controlling the width of its output . Similarly, the ostream class al
Project Description: We refurbish older computer and send them back into the market with windows 7 operating system. We are presently using windows deployment services through P
Class Definition The following is the general format of defining a class template: class tag_name { public : // Must
Each function has its own stack frame between %fp and %sp. Let Caller calls Callee. Then Caller's %sp becomes callee's %fp, and callee's %sp set to be a new value (a smaller one be
Described the "Named Constructor Idiom"?
Object Conversions Just like initialization, conversions are also done automatically when an object of a derived class is assigned to an object of the base class. Though, the c
Write a program called plus that will display asterisks in the shape of a plus sign which has the height and width specified by the user. You must only allow entry of an odd numb
#include #include #include #include #include class Employee { private: char *Name; //Set them as pointers... int IdNumber; char *Department; char *Position; public: voi
how made a flow chart of prime number by using for loop
Define a user-defined data type (struct) called Car to represent a car in the context of a car dealership database. Car must have at least the following characteristics: Make Model
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