Lab05 - Strings and (de)allocation

Task 1

  • Write a program that has a long string as the command-line argument
  • It will print the string's length (create a custom size_t string_length(const char* str) function)
  • It will print the string in reverse order

Task 2

  • Reads a line of text (max 200 characters).
  • Splits it into words separated by spaces.
  • Removes duplicate words (case-insensitive).
  • Prints the cleaned sentence with single spaces between words.

Task 3

Task 4

  • Read an “infinit” text.
  • Counts and prints:
    • The number of words
    • The total number of letters
    • Histogram of letters
    • The longest word and its length
courses/be5b99cpl/labs/lab05.txt · Last modified: 2025/10/22 09:33 by ulricji1