Question: COMPUTER SCIENCE: I need help with the following two functions. The code needs to be written in C : char kstrget(kstring str, size_t pos) -Returns
COMPUTER SCIENCE: I need help with the following two functions. The code needs to be written in C:
char kstrget(kstring str, size_t pos)
-Returns the character at index pos in the str's data.
-If pos is out of bounds (greater than or equal to the length of str), this function should abort the program by calling abort().
void kstrput(kstring str, size_t pos, char ch)
-Replaces the character at index pos in str's data with the character ch.
-If pos is out of bounds (greater than or equal to the length of str), this function should abort the program by calling abort().
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
