[Solved] Project 2 String

$25

File Name: Project_2_String.zip
File Size: 150.72 KB

SKU: [Solved] Project 2 String Category: Tag:
5/5 - (1 vote)

Write an assembly language program to obtain a line of input from the keyboard (a string). Either a loop using the int 21h (function code 08) with echo, a loop using the _getch function, or the getstr function may be used toobtain the string. Limit the string to 50 characters maximum. Then, prompt the user for which function is desired. The functions, as well as sample outputs, are as follows:Function 1: Determine where the first occurrence of a user-input character isin the string (prompt the user for which character to search for). Spacescount as a character.Find the first a in the stringIndependence Day, 2012!The first a occurs in position 15Function 2: Find the number of occurrences of a certain letter in a stringThe letter e occurs in the stringIndependence Day, 2012!4 timesFunction 3: Find the length of the input string.There are 23 characters in the stringIndependence Day, 2012!Note: the spaces count as a character in the overall lengthFunction 4: Find the number of characters of the input string.There are 21 characters in the stringIndependence Day, 2012!Note: the spaces count as a character in the overall lengthFunction 5: Write a routine that replaces every occurrence of a certain letterwith another symbolReplacing all of the ds in the stringIndependence Day, 2012!With h yieldsInhepenhence DayNote that the D remained unchanged.Function 6: Capitalize the letters in the stringCapitalizing each letter in the stringIndependence Day, 2012!yieldsINDEPENDENCE DAY, 2012!Note that the numbers and punctuation marks remain unchangedFunction 7: Make each letter lower caseMaking each letter lowercase in the stringIndependence Day, 2012!yieldsindependence day, 2012!Note that the numbers and punctuation marks remain unchangedFunction 8: Toggle the case of each letterToggling of the letter in the stringIndependence Day, 2012!yieldsiNDEPENCE dAY, 2012!Note that the D remained unchanged.Function 9: input a new stringFunction 10: undo the last action that modified the stringFunction 100: output the menuFunction 0: exit the programOutput the menu after obtaining the string for the first time. Prompt the userfor input where needed. Display prompts for any keyboard input needed isrequired. The program must loop back for additional user input (new stringsor functions), and provide an exit function (function 0). Check for invalidinput for the menu; if the user enters an invalid input, re-output the menuand ask for the function again.Turn in a hard copy of your source code, as well as a hard copy of itsexecution. In addition, please email the source code of your program (as anattachment) to your instructor.

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[Solved] Project 2 String
$25