Home » 1)Implement this instruction to the code provided. a) Create index_of which will return …

1)Implement this instruction to the code provided. a) Create index_of which will return …

Question 1)Implement this instruction to the code provided. a) Create index_of 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 contains was found. from the video, but return the index where the name b) 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) c) Have create and work with an array of strings- Use a constant for the size (make it 5) Loop to read in the names Call to output the details Hint- No iostream please Written Code- #include”splashkit.h” string read_string(string prompt) { string result; write(prompt) ; result = read_line(); return result; } int read_integer(string prompt ) { string line; line = read_string(prompt); return convert_to_integer(line); } int total_length (string names[], int size) { int result = 0; for(int i = 0; i , size, i ) { string name = names[i]; result = name.length(); } return result; } void print_summary( string data[], int size) { int size; string line; } int main() { #define SIZE 3 string names(SIZE); int i; i = 0; while( i < SIZE ) { names[i] = read_string("Enter a name: "); i ; } for(i = 0; i < SIZE; i ) { write_line(names[i]); } int total; total = total_length(names, SIZE); write_line("Total length: "); write_line(total); return 0; } deselashkit.h strirg read striegistring preapt) string result rite(pronpt) 1 result = read-line(); return result 3 int read integer string pronpt 14 string ire line read stringipreapt) return convert to integerrine): 21 int totsl length Istring nanesI), int size] int result 8; string nere naeIil result nane. LengthO return result 3 vold print sunnary string datel, int size) int 512e; string Lire; 40 int nainl) rdetine SIZE 3 string nones(SIZE i-0; aes[i- read string["Enter à nare: write irea) int totaL total total_length(noves, s12E); write_linel Total lengths urite lineltotall: return 8

Calculate the price of your order

550 words
We'll send you the first draft for approval by September 11, 2018 at 10:52 AM
Total price:
The price is based on these factors:
Academic level
Number of pages
Basic features
  • Free title page and bibliography
  • Unlimited revisions
  • Plagiarism-free guarantee
  • Money-back guarantee
  • 24/7 support
On-demand options
  • Writer’s samples
  • Part-by-part delivery
  • Overnight delivery
  • Copies of used sources
  • Expert Proofreading
Paper format
  • 275 words per page
  • 12 pt Arial/Times New Roman
  • Double line spacing
  • Any citation style (APA, MLA, Chicago/Turabian, Harvard)

Our guarantees

Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.

Money-back guarantee

You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.

Read more

Zero-plagiarism guarantee

Each paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.

Read more

Free-revision policy

Thanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.

Read more

Privacy policy

Your email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems.

Read more

Fair-cooperation guarantee

By sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.

Read more