Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Define a two-dimensional array named settings just about the right size to hold the table of data below, initialize the array with the values in
Define a two-dimensional array named "settings" just about the right size to hold the table of data below, initialize the array with the values in the table. No functions needed. With the array provided in question a), write a loop(s) to calculate and display a sum for each row of all the numbers. You do not need to write a function. No spacing or output manipulations needed (15 pts) In this example, your program should display 3 sums: 7,18,9. Write a function named "getAverage" here, with the array provided in question a), use loop(s) to find the average of all values in the array. Your function should accept a two dimensional array and the row size as input parameters, assume column size (COL) is already declared as a constant global variable. Your function should return the average. you will need to write a complete function with function header, also write a call to the function const int COL=3; double getAverage l \{ d) A bookstore has books on 5 racks, with 7 shelves each. Each shelf holds 10 books. Define a three-dimensional array named books large enough to represent the bookstore's storage system (data type: double, suppose you are storing all book's prices), no initialization needed. How many elements are there in this array? e) Briefly explain two major differences between linear search and binary search Answer the following multiple choice questions: 1. What are the correct intermediate steps of the following data set when it is being sorted with the bubble sort? Original: 15,20,10,18 A. 15,10,20,1815,10,18,2010,15,18,20 B. 10,20,15,1810,15,20,1810,15,18,20 C. 15,20,10,1815,10,20,1810,15,20,1810,15,18,20 D. 15,18,10,2010,18,15,2010,15,18,2010,15,18,20 2. In a bubble sort structure, there is/are? A. A single for loop B. Three for loops, all separate C. A while loop D. Two for loops, one nested in the other
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started