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

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

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!