Give a function prototype for newstring


Discuss the below:

The free newString() takes string objects strA and strB as arguments. For its action, newString() compares the string by using < and returns the concatenation of the arguments, with the lesser sring coming first.

a) give a function prototype for newString()

b)Give the implementation for newString()

c) The main program has the following string declarations, which should be used for parts (i) and (ii)
sring A = "String", B = "cat";

i) cout<< newString(A,B) //Output:_________

ii) cout<< newString(A,"C++"); // Output: _______

Solution Preview :

Prepared by a verified Expert
C/C++ Programming: Give a function prototype for newstring
Reference No:- TGS01937499

Now Priced at $20 (50% Discount)

Recommended (97%)

Rated (4.9/5)