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 search for a given character in a string:
Program is to search for a given character in a string and print point of match
char *stsearch(char *string, char search);
void main()
{
clrscr();
char string[20],search,*temp;
int i=0;
cout<<" enter a string ";
gets(string);
cout<<" enter the letter to be searched in a string ";
cin>>search;
temp=stsearch(string,search);
cout<<"String after char search : "< } char *stsearch(char *string, char search) { int i=0; while (string[i]!='\0') { if(search==string[i]) { cout<<" The Character is found : "<<"\n"; return &string[i]; } i++; } cout<<" The char is not found "; return NULL; }
}
char *stsearch(char *string, char search)
while (string[i]!='\0')
if(search==string[i])
cout<<" The Character is found : "<<"\n";
return &string[i];
i++;
cout<<" The char is not found ";
return NULL;
Question 1 Write a program that accepts two numbers from the user and swaps the two numbers without using a temporary variable Question 2 Write a program that accepts a 3x
Introduction to C++ C++ was developed by Bjarne Stroustrup at Bell Laboratories in 1983. Originally, it was known as " C with class". C+ as an enhancement to the C language was
Explain the Symbolic Constants in c language? Symbolic constants are the constants of any type that declared by using the #define compiler directive and it is a preprocessor di
what is the syntax to get a coloured output.
A: They present a degree of freedom in the interface design options. Member functions & friend functions are equally privileged (100% vested). The major difference is that a fri
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 betw Solution:
(i) Vilsmeir reaction
C Program for FUNCTION OF COPY ONE STRING IN OTHER STRING #include stdio.h> #include conio.h> int copy(char a[],char b[]); void main() { char a[100],b[
Define the Char Data Type of C Language? The char defines characters. The char type will usually require only 1 byte of internal storage. Every char type has an equivalent inte
Write a program called A1Q3, that reads it the radius of a circle as an integer and prints the circle's diameter, circumference and area. Use a constant value for pi. Do all calc
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