h6ex6: Conditional statements, loops, pointers, ASCII code

h6ex6: Conditional statements, loops, pointers, ASCII code

You cannot submit for this problem because the homework's deadline is due.

Description

Write a C program where the user inputs a string and is then offered a menu to replace or delete a character of his choice. The program should then display the initial string with the requested changes applied. When deleting a character use the functions memmove or memcpy.

Format

Files

You should submit a tar file containing a c source file ex6.c

Input

three or four lines: a string on the first, a number on the second, and a character on the third and fourth line

the length of the string is no more than 1,000,000

Output

the prompts and one line with the result

Sample 1

Input:

good morning
1
g
d

Output:

Input a string: * Choose 1 to replace a character or 2 to delete a character:   Replace character:   with: New string: dood mornind

Sample 2

Input:

good morning
1
g

Output:

Input a string: * Choose 1 to replace a character or 2 to delete a character:   Delete character: New string: ood mornin

Limitation

1s, 32MiB for each test case.

Assignment 6

Not Claimed
Status
Finished
Problems
6
Open Since
2018-07-01 00:00
DDL
2018-07-10 14:00
Extension
240.0 hour(s)