Question: Write a function printNthCharacter that prints the nth character from every string in an array of strings. It should take as input: an array of

Write a function printNthCharacter that prints the nth character from every string in an array of strings. It should take as input: an array of strings words an integer size for the size of the array an integer n for the position of the character to be printed from each string It should print the nth characters of the strings in the array Example: For this input: ["hey you", "echo", "loyal", "little", "orange", n- We expect this output: hello Since these are the nth(Oth) characters of the strings in the array: ("hey you", "echo", "loyal", "little", "orange") Start by writing the function to print out all the strings in their entirety. (hey youecholoyallittleorange). Then modify it so that only the nth character of each string is printed (hello). Answer: (penalty regime: 0 %) 1 string printNthCharacter(string wordsC], int size, int n) 4
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
