Strings


  1. A text analysis system processes user-entered strings to evaluate character patterns. When a string is input through the keyboard, the system scans each character and identifies uppercase letters. The program counts how many uppercase letters are present in the given string and displays the final count on the screen.

  2. A text processing system is designed to analyze user-entered sentences. When a line containing multiple words is input through the keyboard, the system scans the entire string and identifies words based on spaces between them. The program counts the total number of words present in the given sentence and displays the result on the screen.

  3. A text editor system processes user input strings for formatting purposes. When a string is entered through the keyboard, the system scans each character and converts uppercase letters into lowercase and lowercase letters into uppercase. The modified string is then displayed on the screen after performing the required case conversion.

    Expected Output:
       Enter String : RealJava
       rEALjAVA
                           
  4. Input a string and make its reverse without using library functions.

    Expected Output:
       Enter String : BCE
       ECB
                           

  5. A text validation system is used to compare two user-entered strings for authentication purposes. When two strings are input through the keyboard, the system compares them character by character without using any built-in library functions. If all characters match in the same order and both strings have the same length, the system confirms that the strings are identical; otherwise, it reports that they are different.

  6. A library management system is being developed to store and analyze book titles entered by users. As part of data validation, the system needs to determine the length of each book title. When a title is entered through the keyboard, the system counts the total number of characters. Finally, it displays the length of the string on the screen.

  7. A data masking system is used in a software application to protect sensitive information entered by users. When a string is input through the keyboard, the system checks each character one by one, if any digit (0–9) is found in the string, it is replaced with the character '*'. The modified string is then displayed on the screen to ensure privacy of numeric data.

    Expected Output:
       Enter String : A12BC
       A**BC