Question: Define a function with the prototype char lastInitial(char name[]); that, when given a string containing a space, returns the first character after the first space

Define a function with the prototype

char lastInitial(char name[]);

that, when given a string containing a space, returns the first character after the first space (' '). If there is no space, or the space is the last character, return zero (which is, incidentally, the numeric value of '\0').

Note: this is not returning a one character string, but a character.

c++

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 Programming Questions!