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
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