Arm/chrcpy

From ASMBits

arm/swapPrevious

Write a function that will copy one character from a string to a second string. Your function will be passed four parameters: The first two parameters specify the source string and character position. The third and fourth parameters specify the destination string and character position. Copy the character. (Don't consider null-termination, overflows, etc.)

int chrcpy (char *src, int src_pos, char *dst, int dst_pos);

Expected solution length: Around 5 lines.

Sample Input

chrcpy("hello", 1, "bye", 1)

Sample Output

"bye" -> "bee"

Write your solution here

Upload a source file...