Use the findpos and findaltchar function in encrypt function

Assignment Help Computer Engineering
Reference no: EM132198991

Write a function called encrypt (A, P, Off) where A is an alphabet string, P is a string to be encrypted and Off is the offset.

A new string new P is returned where each character of new P is represented by the character that is Off positions after the character in P (wrapped around to the start if the offset takes it beyond the end of the string).

Use the findpos and findaltchar functions in the encrypt function. Call the encrypt function from the main program and also print the encrypted phrase.

For example, given the alphabet above, an offset of 5 and the phrase hello world, the program should output.

Reference no: EM132198991

Questions Cloud

Perfect competition or monopolistic competition : In which market would you expect firms to advertise the most, perfect competition or monopolistic competition. Clearly explain your answer.
Describe what additional actions the fed would need to take : Use supply-and-demand graphs of the federal funds market to analyze the following situation: Suppose that the equilibrium federal funds rate is equal.
Maintain a fixed exchange rate : Discuss the conditions under which fixed exchange may prove superior to flexible exchange rate.
Explain why acme hospital produces at a higher cost : Suppose that you are interested in comparing the costs of producing inpatient services at Saving Grace Hospital with those at ACME Hospital.
Use the findpos and findaltchar function in encrypt function : Write a function called encrypt (A, P, Off) where A is an alphabet string, P is a string to be encrypted and Off is the offset.
What are the monopoly profits on the vaccine : What price would a profit maximising monopolist charge for a vaccine? What are the monopoly profits on the vaccine? What is the efficient outcome.
Brief synopsis of the differences between private : Provide a brief synopsis of the differences between private, common, and public goods, and the value of this difference to the economy.
What types of concerns require the largest emphasis : Describe your company’s efforts in the area of federal compliance. What types of concerns require the largest emphasis?
Decision making within an organization : Briefly discuss a government policy that affects the decision making within an organization

Reviews

Write a Review

Computer Engineering Questions & Answers

  Analyse how digital convergence affects peoples

Analyse how digital convergence affects peoples use of network devices - Compare and contrast DSSS and FHSS. Which one is more suitable than the other

  Write some cpp code that will read a line of text

Write some C++ code that will read a line of text and echo the line with all uppercase letters deleted. Rewrite the definition of the new Line function.

  Use the .net framework class linrary constant

When user clicks a button to perform the calculation, the button's event procedure should first determine that a selection for the calculation type was made. Next, event procedure should ensure that non-zero, positive values have been entered only..

  Estimate the total number of simd instruction cycles needed

Estimate the total number of SIMD instruction cycles needed to compute the matrix multiplication. The time includes all arithmetic and data-routing operations.

  What are the three steps in an event-controlled loop

What are the three steps in an event-controlled loop? Distinguish between a count-controlled loop and an event-controlled loop.

  Prepare an eduucational game is created to teach young child

Prepare an eduucational game is created to teach young children the vowel letters. write a java program to help the playrs by applying the get the number of characters from the player.

  Define the difference between a simulator and an emulator

Define the difference between a simulator and an emulator. Which would you prefer to work with, and why?

  Using the graphical user interface create a user named cmit

Verify the program starts when CMIT140 logs into the system by logging out and then logging back in as CMIT140.

  Two bluetooth modules to control an led

I am trying to do use two bluetooth modules to control an LEDs. I am using HC05 as master and another as slave. I can get the two bluetooth module to pair up and communicate with one another using a serial communication in the Arduino IDE.

  How converting between different data system

I would like to know how I can convert from signed binary numbers to decimal values, from decimal numbers to signed magnitude, 2's complement, and short floating point format. Also, it would be better to provide examples with positive and negative..

  Which design strategy would you recommend

Assume that you are developing a new system for a local real estate agency. Which design strategy would you recommend for the construction of this system? Why?

  Write a cpp function to retrieve an entry from a hash table

Write a C++ function to retrieve an entry from a hash table with open addressing using (a) linear probing; (b) quadratic probing.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd