Recursion function, Programming Languages

Use recursion to de ne a function position which has as input an integer, a character and a string and returns the result of inserting the character in the string at the position speci ed by the integer. For example: position 4

'a' "012xyz6" = "012xayz6"

An error message should be returned for negative input or if the position is more than the length of the string. De ne a function position2 which has the same e ect as position but which is de ned using take and drop instead of recursion

Posted Date: 3/1/2013 2:55:10 AM | Location : United States

Related Discussions:- Recursion function, Assignment Help, Ask Question on Recursion function, Get Answer, Expert's Help, Recursion function Discussions

Write discussion on Recursion function
Your posts are moderated
Related Questions
Translate the following formula into a prefix form expression in Scheme: Question 2 Define a procedure that takes three numbers as arguments and returns the sum of the squ

what is the c.

How does a Case Structure differ from a Case structure program in pseudocode

A psychologist is interested in learning about the voting behavior of college students.  (4 points for each part.)Design a study which would yield data on this topic. a. state y

Advantages of mvc framework MVC is a conventional style design that many designers are acquainted with. Some kinds of Web programs will advantage from the MVC structur

How to do socket programming in C

You are working for a cryptography department, where one of your jobs is to decipher intercepted messages that have been encrypted using a book cipher. The messages are sent by dif

I have constantly been emailing to get the task i had paid for to be done correctly but no replies from anyone. Not even one acknowledging my emails. Been phoning all the way from

Implement the Prim's algorithm with array data structure as described in slide 12 of the file 04mst.ppt. Your program should have a runtime complexity of O(n2) and should be as eff

Silver light uses WPF to provide included web handles Microsoft Technologies Silverlight uses WPF to provide included web handles similar to Adobe Display, but with more focus on a