Site icon UK Essayz

Visual Studio Project 1: Silly Strings

Project 1: Silly Strings
Using Visual Studio with 32-bit x86 assembly language to write a string-processing program. Your code will obtain a string (max 50 characters) from the keyboard, using either a loop with readchar calls (with screen echo) or by using a call to readstring. The will terminate the string, and is not a valid character to use inside the string.
Once the string is input, output the user menu to the screen, prompting the user for which function to use. The menu will simply give the function numbers and a brief description for its function. The function definitions, as well as sample outputs, arc below. Each function group is to be written as its own programing module, or set of instructions. You may place each function, or group of related functions, in its ow n procedure or macro if you wish. Regardless of programming choice, ensure that each function group is discernable in your source code by comments or whitespace (for debugging purposes).
Note that each modified function acts on the last modified version of the string. For example, if a character is replaced, then replace the characters in the string, saving the new string as the string to operate on for future functions. Future string modifications will then use this newly-modified string for changes.
Function 1: Determine the position (0-indexed) of the l’1 occurrence of a user-input character (prompt for character input) is in the string. Spaces count as a character.
Enter a character to determine the first occurrence of: a
The first *a’ is at position 14 in the string “Independence Day. 2017!”
Function 2: Find the number of occurrences of a certain letter in a string
Enter a character to determine the number of occurrences: e
The letter ‘c’ occurs 4 times in the string ‘‘Independence Day, 2017!”
Function 3: Find the length of the input string (including spaces).
There are 23 total characters in the string ‘‘Independence Day, 2017!”
Function 4: Find the number of alphanumeric characters of the input string.
There arc 19 alphanumeric characters in the string ‘‘Independence Day, 2017!”
Function 5: Replace even occurrence of a certain letter with another symbol (case- sensitive; D remains unchanged in the example, while d is replaced)
Enter a character to replace: Enter replacement character: h Replacing all of the d’s in the string ‘‘Independence Day, 2017!” With h yields “Independence Day” Function 6: Capitalize letters in the string (non-alphabetic characters unchanged) Capitalizing each letter in the string "Independence Day, 2017!” yields "INDEPENDENCE DAY, 2017!”