Write a c++ program that take two strings and compare between them. This program tests the strings with these functions:
1 string_smaller_than( ):- Function which take two string and returns 'True' if 'first' is alphabetically smaller than 'second'. Otherwise, it return ‘False’
2 string_ptr_smaller_than ( ):- Pointer arithmetic version of function which returns 'True' if 'first' is alphabetically smaller than 'second'. Otherwise, it return ‘False’
Hint:-
1 You may assume that the two strings contain only lower case letters, and no blanks or other non-alphabetic characters.
2 Test your function with a suitable main program.
2007-12-11
04:53:37
·
3 answers
·
asked by
seba
1
in
Programming & Design