Write the code to update every other element

Assignment Help Programming Languages
Reference no: EM131321817

Assignment

The assignment is as follows: Use the program, Arrays of Pointers, on p. 188 of the text "Ch. 4, of Ivor Horton's Beginning Visual C++ 2010" as a starting point for this assignment. Refer to Appendix C for full directions on the changes to the program you must make to complete this assignment. // Ex4_07.cpp // Initializing pointers with strings #include using std::cin; using std::cout; using std::endl; int main() { char* pstr[] = { "Robert Redford", // Initializing a pointer array "Hopalong Cassidy", "Lassie", "Slim Pickens", "Boris Karloff", "Oliver Hardy" }; char* pstart("Your lucky star is "); int dice(0); cout cin > > dice; cout if(dice > = 1 & & dice cout else cout cout return 0; } Appendix C Reference the following instructions to assist you when completing your Programming Using Arrays and Pointers assignment. • Using a for loop, print the contents of the array. The output should appear like this:

PRINTING CONTENTS OF ARRAY

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

• Change the program logic to prompt you for a position within the array that coincides with the letter. See the following example: This is the title to your Program related to the alphabet. Select the number that coincides with the alphabet. For example, the number 7 should display the letter G. Enter a number between 1 and 26: 4 The number you selected: 4 The letter related to this number: D

• Write the code to update every other element within the array with a lowercase x. The output should appear like the following: PRINTING CONTENTS OF ARRAY and adding x to every other element A x C x E x G x I x K x M x O x Q x S x U x W x Y x

• Write the code that will display only the even or odd numbered elements within the array. The output should appear as follows: PRINTING CONTENTS OF ARRAY USING THE MOD Option

Even Numbered Element = 0 Contents of Element within Array is = A Even Numbered Element = 2 Contents of Element within Array is = C Even Numbered Element = 4 Contents of Element within Array is = E Even Numbered Element = 6 Contents of Element within Array is = G Even Numbered Element = 8 Contents of Element within Array is = I Even Numbered Element = 10 Contents of Element within Array is = K Even Numbered Element = 12 Contents of Element within Array is = M Even Numbered Element = 14 Contents of Element within Array is = O Even Numbered Element = 16 Contents of Element within Array is = Q Even Numbered Element = 18 Contents of Element within Array is = S Even Numbered Element = 20 Contents of Element within Array is = U Even Numbered Element = 22 Contents of Element within Array is = W Even Numbered Element = 24 Contents of Element within Array is = Y.

Reference no: EM131321817

Questions Cloud

Why is hacking a big threat to system security : Following the history of hacking, can you say that hacking is getting under control? Why or why not?
What is the difference between the two : In experimental research, there is (are) always independent and Dependant variables. This is one of the most confusing things for students to get about experimental research. It took me a while before I could really pick them out while reading a j..
Create a 20 item likert scale to assess it : Choose a conceptual variable that can be considered to be a trait of interest to you, and create a 20-item Likert scale to assess it. Administer the scale to at least 20 people.
Discussion of the issues of treatment refusal : According to the Christian narrative and the discussion of the issues of treatment refusal, patient autonomy, and organ donation in the topic readings, how might one analyze this case
Write the code to update every other element : Write the code to update every other element within the array with a lowercase x. The output should appear like the following: PRINTING CONTENTS OF ARRAY and adding x to every other element A x C x E x G x I x K x M x O x Q x S x U x W x Y x.
Discuss the major sources of computer crimes : Insider abuse is a major crime category. Discuss ways to solve it.
What training would you suggest for new leaders : Could a new leader "know" how to influence others if a person cannot manage one's behavior? What training would you suggest for new leaders
Devise a plan to compute the cost of computer crime : Study the reporting patterns of computer crimes reporting by industry. Which industry reports best?
Compute the interrater reliability of the coding : Compute the Pearson correlation coefficient between the new measure and the score on the Likert scale. Does the correlation demonstrate construct validity?

Reviews

Write a Review

Programming Languages Questions & Answers

  Write a haskell program to calculates a balanced partition

Write a program in Haskell which calculates a balanced partition of N items where each item has a value between 0 and K such that the difference b/w the sum of the values of first partition,

  Create an application to run in the amazon ec2 service

In this project you will create an application to run in the Amazon EC2 service and you will also create a client that can run on local machine and access your application.

  Explain the process to develop a web page locally

Explain the process to develop a Web page locally

  Write functions

These 14 questions covers java class, Array, link list , generic class.

  Programming assignment

If the user wants to read the input from a file, then the output will also go into a different file . If the user wants to read the input interactively, then the output will go to the screen .

  Write a prolog program using swi proglog

Write a Prolog program using swi proglog

  Create a custom application using eclipse

Create a custom Application Using Eclipse Android Development

  Create a application using the mvc architecture

create a application using the MVC architecture. No scripting elements are allowed in JSP pages.

  Develops bespoke solutions for the rubber industry

Develops bespoke solutions for the rubber industry

  Design a program that models the worms behavior

Design a program that models the worm's behavior.

  Writing a class

Build a class for a type called Fraction

  Design a program that assigns seats on an airplane

Write a program that allows an instructor to keep a grade book and also design and implement a program that assigns seats on an airplane.

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