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 take two arguments and returns the string:
Program is to take two arguments and returns the string which is larger the larger string has larger ascii value invoke function from main
int compare(char *st,char *st2);
void main()
{
clrscr();
int x;
char st[20],st2[20];
int ans;
cout<<" enter the first string ";
gets(st);
cout<<" enter the second string ";
gets(st2);
ans=compare(st,st2);
if (ans==0)
cout<<" the larger string is "< else cout<<" the larger string is "< } int compare(char *st,char *st2) { int i=0; while(st[i]!='\0' && st2[i] != '\0') { if (st[i]==st2[i]) { i++; } else if (st[i]>st2[i]) return 1; else return 0; } return 0; }
else
cout<<" the larger string is "< } int compare(char *st,char *st2) { int i=0; while(st[i]!='\0' && st2[i] != '\0') { if (st[i]==st2[i]) { i++; } else if (st[i]>st2[i]) return 1; else return 0; } return 0; }
}
int compare(char *st,char *st2)
int i=0;
while(st[i]!='\0' && st2[i] != '\0')
if (st[i]==st2[i])
i++;
else if (st[i]>st2[i])
return 1;
return 0;
What does throw; (with no exception object after the throw keyword) mean? Where would I employ it? A: You should see code that looks something like this: class MyException
A palindrome is a string that reads the same from both the ends. Given a string S convert it to a palindrome by doing character replacement. Your task is to convert S to palindrome
If quicksort is so quick, why bother with anything else? If bubble sort is so bad, why even mention it? For that matter, why are there so many sorting algorithms? Your mission (sho
C Program to copy the contents of a file: void main() { ifstream fin("input.txt"); ofstream fout("output.txt"); char ch; while (fin) {
In this problem, you will write a program that implements two algorithms for performing exact inference given a Bayesian network, namely, enumeration and variable elimination. Your
The Main program is slightly more complicated and you need to think about the I/O process. First of all, for most applications you do not call the low level routines GetChar and P
Consider the following algorithm to generate a sequence of numbers. Start with an integer n. If n is even, divide by 2. If n is odd, multiply by 3 and add 1. Repeat this process wi
A company needs 200 pencils per year . you cannot simply use this price as the cost of pencils two years from now. Because of inflation the cost is likely to be higher than it is
I need to make a fractal trees in OpenGL C++ . The method used is to write a recursive function with cylinders of different sizes and angles to create the tree trunk and branches.
Write a C program to compute the value of a sine wave from 0 to 2P with an increment of 0.1 radians. #include stdio.h #include math.h #define pi 3.1415927 void main() { c
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