Part A 1. How is data stored in memory for a two dimensional…

Part A 1. How is data stored in memory for a two dimensional…

Part A  1. How is data stored in memory for a two dimensional…

Part A 1. How is data stored in memory for a two dimensional array?

  • 2. What do you have to keep track of yourself when using a range-based for loop?
  • 3. Is data store the same way in two dimensional std::arrays as in the built-in arrays?

4. What is the data type of “&i” in the range-based for loop in the Part A-4 code example?

Part B

  • 1. What happens to multiword text when using cin?
  • 2. What happens to cin when it finds text when it expects numbers?
  • 3. What is the difference between cin.getline(cstr) and getline(cin, str)?

4. What is the #include you need if you want to use stringsteam?

Part C

  • 1. Describe how you think the combat works in the switch in the Part C-1 code.
  • 2. Do you prefer the combat that uses the switch or the combat that uses the conditional operator? Explain why.

3. Which command, break or continue causes you to leave the loop?

Part D

  • 1. The data is written to the file with a new line after each value is written. Why do you think this was done?
  • 2. How would you read the data if each value wasn’t written on a separate line?
  • 3. Given the output format of the text file, what would happen if we changed the order we used to read the data from the file?

4. What would you have to do if you added another attribute to the characters, “endurance” for example?

Do you need a similar assignment written for you from scratch? We have qualified writers to help you. You can rest assured of an A+ quality paper that is plagiarism free. Order now for a FREE first Assignment! Use Discount Code "FREE" for a 100% Discount!

NB: We do not resell papers. Upon ordering, we write an original paper exclusively for you.

Order New Solution