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;
Templates permit to create generic functions that admit any data type as parameters and return value without having to overload the function with all the possible data types. Until
i havea a small C++ i need help with. should not be anything special for an experienced programmer
Within programs we very often want to execute a different section of code, depending upon various conditions within C the If statement is used to achieve this. The If statement con
Returning References from Functions Just as in passing the parameters by reference, returning a reference also doesn't return back a copy of the variable , instead an alias is
Implementing files in c++
Question: (a) A bank has four types of accounts with annual interest rates as follows: Savings 8% Savings with Cheque Book 5% Current 4% Fixed deposits 10% Using
Consider text comprised of sentences and sentences comprised of words. Words in a sentence will be space delimited. Given a text and K strings, task is to find out the number valid
Ask question #M i want to undersatnd about tree structures like node leaf etcinimum 100 words accepted#
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
The Special Pointer 'this' When various instances of a class come into existence, it naturally follows that each instance has its own copy of member variables. If this were not
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