Question
Please write/Complete the following methods in C language (Just C language, not C++ and not C#). /* Return true (non-zero) if c is a whitespace
Please write/Complete the following methods in C language (Just C language, not C++ and not C#).
/* Return true (non-zero) if c is a whitespace characer (' ', '\t', or ' '). Zero terminators are not printable (therefore false) */ int space_char(char c);
/* Return true (non-zero) if c is a non-whitespace character (not space, tab, or newline). Zero terminators are not printable (therefore false) */
int non_space_char(char c);
/* Returns a pointer to the first character of the next space-separated word in zero-terminated str. Return a zero pointer if str does not contain any words. str is assumed to be pointing to a space character */
char *word_start(char *str);
/* Returns a pointer terminator to the first space character or string-terminator following str in a zero terminated string. str is assumed to be pointing to a non-space character*/
char *word_end(char *str);
/* Counts the number of space seperated words in the string argument. */
int count_words(char *str);
/* Returns a freshly allocated new zero-terminated string containing chars from */
char *copy_str(char *inStr, short len);
I've added a couple more methods which may help a bit more. Please let me know what else or be more specific as to what other information is needed.
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