Course Content
Programming in C
About Lesson
  1. Write a function strconcat(s, t), that appends string t to the end of string s.
  2. Write a function strsuffix(s, t), which returns 1 if the string t occurs at the end of string s, otherwise returns 0.
  3. Write a function strncompare(s, t, n) to compare up to n characters of strings s and t. If the two strings match, it returns 0. Otherwise, if the first mismatched character has lower value in s, then it returns -1, else 1.
  4. Write a program to input multiple lines of text and sort them in lexicographical order.
  5. Modify the previous program to handle -r flag, which would reverse the ordering of the output.
  6. In the previous program, add a -n option, which means that the input will be numbers (floating-point values) instead of text.
Scroll to Top