Question
Please complete in C. void add_prefix(char* number, char p0, char p1); //Pointer 'number' is pointing a NULL terminated string, which has enough memory to add
Please complete in C.
void add_prefix(char* number, char p0, char p1);
//Pointer 'number' is pointing a NULL terminated string, which has enough memory to add
//two more characters.
//Move all the characters of the string 2 positions right.
//Insert 'p0' at the first index of the string.
//Insert 'p1' at the second index of the string.
char* extend_to_word_size(char* number, int word_size);
//If the length of the 'number' is greater than 'word_size' report error.
//If the length of the 'number' is less than 'word_size' do the followings:
// Allocate enough memory for a new word.
// Fill the most significant extra digits of the word with zeros and copy
// the least significant digits from the number.
// Free the memory from the pointer 'number'.
// Point the new word by the pointer 'number'.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started