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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!