Help with c-string

Given the following:

char s1[] = "Albuquerque";
char s2[] = "Reno";
char ds[8];

1- Write the code necessary to use a function from <cstring> library to safely copy the value from s1 into ds. After this operation, ensure that ds is a valid c-string.

2- Write the code necessary to compare the values contained in s1 and s2 and print them to the screen in reverse alphabetical order.
closed account (48T7M4Gy)
Feel free Suar to go first. That way if you post your code to the best of your ability we can happily provide opinions, advice, tips, hints, corrections where appropriate.

[ BTW there are heaps of well-written tutorials, especially the demo samples that run, in the same area. ]
Last edited on
Dear Suar,

You should at least try a bit by yourself and let us know what you can do more to make your code more efficient. Then we would tell you what next to do
Topic archived. No new replies allowed.