Question: Write the function void longest (char *in, int n, char ***out); which receives the string in, an integer value n, and it returns the pointer

Write the function

void longest (char *in, int n, char ***out);

which receives the string in, an integer value n, and it returns the pointer to a dynamically allocated array of strings out. The value of n indicates the number of sub-strings within in including only uppercase consecutive letters. The array of strings out should contain all such sub-strings, and it must be allocated by the function. For example with the string in = "THIS is a STring incLUDing small and capITAL lETTERS", which includes n = 5 sub-strings with only capital letters, the function has to create and return the pointer out referencing the following array of strings {"THIS", "ST", "LUD", "ITAL", "ETTERS"}.

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!