Create and work with an array of strings

Assignment Help Programming Languages
Reference no: EM132130557

Task: Working with Arrays

Overview

In this task you will create a simple program which will create and work with an array of strings. This array will then be populated with values, printed out to the console, and then, we'll use the values to calculate some basic statistics.

Instructions

Lets get started.

1. Create your own Working With Arrays project, and copy in the code of your user input functions, or your custom terminal user input code file and header.

2. Add the following functions and procedures based on the week's videos:

Create an index of function which will return the index of a given name in the array. This should return -1 if the name is not present.

int index_of(string value, string data[], int size)

Hint: Use similar logic to was found.

contain from the video, but return the index where the name

Create a print summary procedure that accepts the array and its size, then prints out all of the names, the total length of these names, the index of your name (or -1 if your name is not in the array), and the shortest name.
void print_summary(string data[], int size)

Have main create and work with an array of strings

Use a constant for the size (make it 5) Loop to read in the names
Call print summary to output the details

3. Run your program twice to test both with and without your name in the array, then grab a screenshot of the output.

Reference no: EM132130557

Questions Cloud

Evaluate the overall performance of the firm sales force : xplain why it is important to evaluate the overall performance of the firm's sales force and list the advantages and disadvantages of sales
What decisions were or were not made in the case study : What decisions were or were not made in the case study? Do you believe the decisions or best practices were appropriate?
Who are the stakeholders in case : 1.1 Who are the stakeholders in this case and what are their stakes? 1.2 Is it possible for stakeholder relationship to be only one-way? Discuss.
Will it affect the overall credibility of your agency : What effect will such a drastic measure have on the personnel's families? If you keep them, will it affect the overall credibility of your agency?
Create and work with an array of strings : Create a simple program which will create and work with an array of strings. This array will then be populated with values, printed out to the console
What concrete evidence or support is the author using : The questions to consider in your post are: What concrete evidence or support is the author using to sway the audience? Are there fallacies in her logic?
Data on what makes a car american : The article titled "Data on What Makes a Car American" Is Not-So-Fine-Tuned from the Wall Street Journal before answering the questions below.
Read the case history and discuss the management strategy : Read the case history and discuss the Management strategy that resulted in Reader's Digest's bankruptcy.How would you change the strategy that resulted
What obstacles does each character face : What specific claims you can make about the movies. the main character in each movie struggles to succeed in their goal. This would be a good claim to explore.

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