Answered step by step
Verified Expert Solution
Link Copied!

Question

00
1 Approved Answer

Array Split Write a recursive function split that takes an array of characters as input and prints its content to the standard output, each character

image text in transcribed
Array Split Write a recursive function split that takes an array of characters as input and prints its content to the standard output, each character on a separate line, surrounded by asterisks. For example if the array contains the characters: GO SPARTANS! The function split should output aligned: Write a program split.c that asks the user to enter a number corresponding to the number of characters to be stored. Your program should then ask the user to enter those values and store them in an array. Use the function split you wrote to print the array content aligned and surrounded by asterisks. Write another recursive function splitAndMove in split.c that prints the content of the array similar to the previous function split but with each line indented by an additional space with respect to the previous line. For example, suppose that the array containing: GO SPARTANS! The function splitAndMove should output indented: *G Modify your program to additionally ask the user how he wants the array printed as the last input (input a for aligned or input i for indented) and print the array accordingly

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions