Question: C++ Write a function is_word with the following signature: bool is_word(string s) that returns true if s is a word, and false otherwise. A word

C++

Write a function is_word with the following signature:

bool is_word(string s) 

that returns true if s is a word, and false otherwise.

A word is defined as only having the characters a-zA-Z and nothing else, all lowercase, capitalized or all uppercase (eg. test, Test, TEST), at least one character long

Restrictions:

In your submitted work (any of the functions you write) you should not print out anything to cout or cerr, and you should not use terminal input cin.

You may only include the libraries iostream and string. No other includes are permitted.

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!