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;
Objective: Construct a C program that controls the LCD display, and is capable of displaying strings. Add functions to the C program that allows more control over the display.
There is a pebble merchant. He sells the pebbles, that are used for shining the floor. His main duty is to take the length of the room’s sides. But he sometimes mistakes doing that
Operation on String - C ++ Program: Write a program to define operations on string in c++. class String { char *char_ptr; // pointer to string contents int le
Example for Register Storage Class - computer programming? main() { register int i; for (i=0; i { ............... ............... } } /* block exit will free the register
Program is to find the maximum from two numbers: Program is to find the maximum from two numbers entered by the user having pointer variable as parameter void main() {
Ask question #write statement that assign random integer to the varaible n in the (100
please may i have a brief theory about a c++ program to find net salary of employees
Both malloc & new functions are utilized for dynamic memory allocations & the basic difference is: malloc need a special "typecasting" while it allocates memory for eg. if the poin
Explain about Evaluation of Expression in c language? An Expressions are evaluated using an assignment statement of the form: variable = expression; The Variable is any v
Is computer an intelligent machine?
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