Starting Out with C++ from Control Structures to Objects (8th Edition)
8th Edition
ISBN: 9780133769395
Author: Tony Gaddis
Publisher: PEARSON
expand_more
expand_more
format_list_bulleted
Textbook Question
Chapter 7, Problem 33RQE
The ________________ is a collection of programmer-defined data types and
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
Fill-in-the-Blank
A data structure that points to an object of the same type as itself is known as a(n) __________ data structure.
Task 4
Sometimes, data we store or retrieve in an application can have little or no order. We may
have to rearrange the data to correctly process it or efficiently use it. As a programmer,
you have to deal with large amounts of data from time to time. This data needs to be
sorted in a logical manner. Sorting and searching can be achieved in Python through the
use of simple statements and algorithms.
Discuss the basic Sorting Algorithms and Searching Algorithms in Python, provide a
suitable example to demonstrate the application of the algorithms discussed.
function main() {
# ist: input numbers #w: outer for loop index
# X: inner for loop index
# y: number of parsmeters
# min: index for max value at the time of iteration
# buf: used for swapping
____________________a _______ #declare local vars
let=___________b___ #intialize aary with the parametrs
y= _______c___ # find the lenght of lstfor((________________)); do
min=________e_____ # intialize main index
for ((___________f_______)); do # find index for main value in one line. use a short tets. _________g_____done
# swap- two values using two indices, min and outerloop
# use buf to hold value when swapping
________________h________ # move min lst [.] to buf
________________i_______ # move lst[.] to lst[.]
_________________j_____ # move buf to lst[.]done}main "@" # pass the input parameters to the function main# end of bash script
show me the ss when u run chatgpt doesnt give right code
Chapter 7 Solutions
Starting Out with C++ from Control Structures to Objects (8th Edition)
Ch. 7.3 - Define the following arrays: A) empNums, a...Ch. 7.3 - Prob. 7.2CPCh. 7.3 - Prob. 7.3CPCh. 7.3 - Prob. 7.4CPCh. 7.3 - What is array bounds checking? Does C++ perform...Ch. 7.3 - What is the output of the following code? int...Ch. 7.3 - The following program skeleton contains a...Ch. 7.7 - Given the following array definition: int values[]...Ch. 7.7 - Given the following array definition: int nums[5]...Ch. 7.7 - Prob. 7.12CP
Ch. 7.7 - What is the output of the following code? (You may...Ch. 7.8 - Prob. 7.14CPCh. 7.8 - Prob. 7.15CPCh. 7.8 - When used as function arguments, are arrays passed...Ch. 7.8 - What is the output of the following program? (You...Ch. 7.8 - The following program skeleton, when completed,...Ch. 7.10 - Prob. 7.19CPCh. 7.10 - How many elements are in the following array?...Ch. 7.10 - Write a statement that assigns the value 56893.12...Ch. 7.10 - Prob. 7.22CPCh. 7.10 - Prob. 7.23CPCh. 7.10 - Fill in the table below so that it shows the...Ch. 7.10 - Write a function called displayArray7. The...Ch. 7.10 - A video rental store keeps DVDs on 50 racks with...Ch. 7.12 - Prob. 7.27CPCh. 7.12 - Write a definition statement for a vector named...Ch. 7.12 - Prob. 7.29CPCh. 7.12 - Write a definition statement for a vector named...Ch. 7.12 - Prob. 7.31CPCh. 7.12 - snakes is a vector of doubles, with 10 elements....Ch. 7 - Prob. 1RQECh. 7 - Look at the following array definition: int...Ch. 7 - Why should a function that accepts an array as an...Ch. 7 - Prob. 4RQECh. 7 - Prob. 5RQECh. 7 - Prob. 6RQECh. 7 - Prob. 7RQECh. 7 - Assuming that numbers is an array of doubles, will...Ch. 7 - Prob. 9RQECh. 7 - Prob. 10RQECh. 7 - How do you establish a parallel relationship...Ch. 7 - Prob. 12RQECh. 7 - When writing a function that accepts a...Ch. 7 - What advantages does a vector offer over an array?Ch. 7 - Prob. 15RQECh. 7 - The size declarator must be a(n) ________ with a...Ch. 7 - Prob. 17RQECh. 7 - Prob. 18RQECh. 7 - The number inside the brackets of an array...Ch. 7 - C++ has no array ________ checking, which means...Ch. 7 - Starting values for an array may be specified with...Ch. 7 - If an array is partially initialized, the...Ch. 7 - If the size declarator of an array definition is...Ch. 7 - By using the same _________ for multiple arrays,...Ch. 7 - Prob. 25RQECh. 7 - Prob. 26RQECh. 7 - To pass an array to a function, pass the ________...Ch. 7 - A(n) _______ array is like several arrays of the...Ch. 7 - Its best to think of a two-dimensional array as...Ch. 7 - Prob. 30RQECh. 7 - Prob. 31RQECh. 7 - When a two-dimensional array is passed to a...Ch. 7 - The ________________ is a collection of...Ch. 7 - The two types of containers defined by the STL are...Ch. 7 - The vector data type is a(n) ____________...Ch. 7 - Prob. 36RQECh. 7 - To store a value in a vector that docs nor have a...Ch. 7 - To determine the number of elements in a vector,...Ch. 7 - Use the _______________ member function to remove...Ch. 7 - To completely clear the contents of a vector, use...Ch. 7 - Prob. 41RQECh. 7 - Prob. 42RQECh. 7 - In a program, you need to store the identification...Ch. 7 - Prob. 44RQECh. 7 - In a program, you need to store the populations of...Ch. 7 - The following code totals the values in two...Ch. 7 - Prob. 47RQECh. 7 - Prob. 48RQECh. 7 - Prob. 49RQECh. 7 - Prob. 50RQECh. 7 - Prob. 51RQECh. 7 - T F The individual elements of an array are...Ch. 7 - T F The first element in an array is accessed by...Ch. 7 - Prob. 54RQECh. 7 - Prob. 55RQECh. 7 - T F Subscript numbers may be stored in variables.Ch. 7 - T F You can write programs that use invalid...Ch. 7 - Prob. 58RQECh. 7 - T F The values in an initialization list are...Ch. 7 - T F C++ allows you to partially initialize an...Ch. 7 - T F If an array is partially initialized, the...Ch. 7 - T F If you leave an element uninitialized, you do...Ch. 7 - T F If you leave out the size declarator of an...Ch. 7 - T F The uninitialized elements of a string array...Ch. 7 - T F You cannot use the assignment operator to copy...Ch. 7 - Prob. 66RQECh. 7 - T F To pass an array to a function, pass the name...Ch. 7 - T F When defining a parameter variable to hold a...Ch. 7 - T F When an array is passed to a function, the...Ch. 7 - T F A two-dimensional array is like several...Ch. 7 - T F Its best to think of two-dimensional arrays as...Ch. 7 - T F The first size declarator (in the declaration...Ch. 7 - T F Two-dimensional arrays may be passed to...Ch. 7 - T F C++ allows you to create arrays with three or...Ch. 7 - Prob. 75RQECh. 7 - T F To use a vector, you must include the vector...Ch. 7 - T F vectors can report the number of elements they...Ch. 7 - T F You can use the [ ] operator to insert a value...Ch. 7 - T F If you add a value to a vector that is already...Ch. 7 - int sixe; double values [size];Ch. 7 - Prob. 81RQECh. 7 - Prob. 82RQECh. 7 - Prob. 83RQECh. 7 - int numbers[8] ={1,2, , ,4, , 5};Ch. 7 - float ratings[] ;Ch. 7 - Prob. 86RQECh. 7 - Prob. 87RQECh. 7 - Prob. 88RQECh. 7 - void showValues(int nums [4][]) { For (rows = 0;...Ch. 7 - Prob. 90RQECh. 7 - Largest/Smallest Array Values Write a program that...Ch. 7 - Rainfall Statistics Write a program that lets the...Ch. 7 - Chips and Salsa Write a program that lets a maker...Ch. 7 - Larger than n In a program, write a function that...Ch. 7 - Monkey Business A local zoo wants to keep track of...Ch. 7 - Rain or Shine An amateur meteorologist wants to...Ch. 7 - Number Analysis Program Write a program that asks...Ch. 7 - Lo Shu Magic Square The Lo Shu Magic Square is a...Ch. 7 - Payroll Write a program that uses the following...Ch. 7 - Drivers License Exam The local Drivers License...Ch. 7 - Prob. 11PCCh. 7 - Grade Book A teacher has five students who have...Ch. 7 - Lottery Application Write a program that simulates...Ch. 7 - vector Modification Modify the National Commerce...Ch. 7 - World Series Champions If you have downloaded this...Ch. 7 - Name Search If you have downloaded this books...Ch. 7 - Tic-Tac-Toe Game Write a program that allows two...Ch. 7 - 2D Array Operations Write a program that creates a...Ch. 7 - Prob. 20PC
Additional Engineering Textbook Solutions
Find more solutions based on key concepts
Describe a method that can be used to gather a piece of data such as the users age.
Web Development and Design Foundations with HTML5 (8th Edition)
Add a method called checklndex to the MusicOrganizer class. It takes a single integer parameter and checks whet...
Objects First with Java: A Practical Introduction Using BlueJ (6th Edition)
Write a grading program for a class with the following grading policies: a. There are two quizzes, each graded ...
Problem Solving with C++ (9th Edition)
Does a static member variable come into existence in memory before, at the same time as, or after any instances...
Starting Out with C++: Early Objects (9th Edition)
Given that y=ax3+7, which of the following are correct Java statements for this equations? int y = (a x) x x...
Java How To Program (Early Objects)
Find the errors in the following code: 5. The following statement should determine whether x is not greater tha...
Starting Out with Java: Early Objects (6th Edition)
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- question in C language: Write a program that processes students' scores using a two-dimensional array. I get three grades: Korean, English, and math. The total score and average of each student are obtained and output as the subject score. output must be the same as on the picture(no change): CN "C:\Program Files#Microsoft Visual Studio WMy... | Enter the score... 1: 80 90 88 2: 78 75 98 3: 89 92 85 4: 70 80 90 5: 95 85 94 NO KOR ENG MATH 1: 80 90 88 2: 78 75 98 3: 89 92 85 4: 70 80 90 5: 95 85 94 Press any key to continue тот 258 251 266 240 274 AUG 86.00 83.67 88.67 80.00 91.33 Xarrow_forwardPython learning object : Function creation Character multiplication (a * 5 == aaaaa) Using len function In the code I should also define __name__ == '__main__'arrow_forwardC languagearrow_forward
- Task - Using pointers to process arrays (C Languaage) In a TV show, each minute can be either interesting or boring. Assume that if 7 consecutive minutes are boring, then an average viewer will stop watching the show. Write a C program that calculates how many minutes that an average viewer will watch a TV show, given the interesting minutes. Assume the TV shows are 45 minutes long. Requirements Name your program project4_minutes.c. Follow the format of the examples below. The program will read in the number of interesting minutes, then read in the interesting minutes. The program should include the following function. Do not modify the function prototype. int find_minute(int *minutes, int n); minutes represents the input array for interesting minutes, n is the length of the array (the number of interesting minutes). The function returns the how many minutes an average viewer will watch the show. This function should use pointer arithmetic– not subscripting – to visit array…arrow_forwardC++ programming Chapter(s) Covered: Chapter 1-8 Concepts tested by the program: Working with one dimensional parallel arrays Use of functions Use of loops and conditional statements Project Description The Lo Shu Magic Square is a grid with 3 rows and 3 columnsshown below. The Lo Shu Magic Square has the following properties: The grid contains the numbers 1 – 9 exactly. Each number 1 – 9must not be used more than once. So, if you were to add up thenumbers used, The sum of each row, each column and each diagonal all add upto the same number, Write a program that simulates a magic square using 3 onedimensional parallel arrays of integer type. Each one the arrays corresponds to a row of the magicsquare. The program asks the user to enter the values of the magicsquare row by row and informs the user if the grid is a magicsquare or not. See the sample outputs for more clarification. Project Specifications Input for this project: Values of the grid (row by row) Output for this…arrow_forwardInput operations are supported by class__________________arrow_forward
- Prgramming logic and designarrow_forward✓ Allowed languages C Problem Statement Write a C Program that will left rotate an array. Input Input starts with a number N and is followed a set of numbers: size, array, s Output The program will left rotate the array s steps to the left Limits 1 <= N <= 20 All inputs are less than 1000 Notes Problems will have test cases that are not listed in their specification. Your solution must produce the right output for these hidden test cases. Sample Input #1 4 5 1 2 4 4 6 7 7 1 6 2 1 3 9 8 9 10 7 1 2 3 4 5 6 7 7 3 4 5 3 Sample Output #1 4 5 1 2 3 6 77 4 8 9 2 1 3 9 1 2 3 4 5 6 7 Copy Copyarrow_forwardFill-in-the-Blank __________ are pointer-like objects used to access information stored in a container.arrow_forward
- // main module Function main() // Local variables Declare numbers[] // declare array & initialize Declare high =0 Declare low=0 Declare average=0 Declare total=0 // Get numbers For index = 0 to 5 // 5 for testing purposes Display “Enter number : “ Input numbers[index] End For // Get statistics For index = 0 to 5 If index == 0 Then Set high = numbers [index] Set low = numbers [index] End If If high < numbers [index] Then Set high = numbers [index] End If If low > numbers [index] Then Set low = numbers [index] End If Set total = total + numbers [index] End For Set average = total/(index + 1) // multiple ways of executing line above // Show statistics Call showStats(high, low, total, average) End Function main() // The showStats module shows high, low, average number Function showStats(Integer high, low, total, average) Display “High number is: ”,…arrow_forwardC++ LANGUAGE Create a menu system program using Function: Menu System 1 – converting ft to inch 2 – Area of a circle 3 – Exit C++ LANGUAGE Discussion Array Store the 12 numbers in an arrayNum by using input. Then output the 12 numbers on array. Example: 4 – 6 – 7 – 8 – 9 – 5 – 3 - 1- 22 – 2 – 33 - 8 upload your screenshot of the codes and output.arrow_forwardnumpy.ipynb 1. addToArray(i) def addToArray(i): # TO DO %time addToArr(10) 2. a function def findDriver(distanceArr, driversArr, customerArr): result = '' ### put your code here return result print(findDriver(locations, drivers, cust)) # this should return Clara 3. The Amazing 5D Music example array([[ 1, 3, -2, -4, -1], [ 0, -1, 1, -1, -2], [ 2, 3, -2, -3, -1], [ 1, -1, 0, -1, -3], [-2, -1, 1, -1, -3], [ 1, 3, -1, -2, -3]]) ``` # TODO array([11, 5, 11, 6, 8, 10]) # TODO array([1, 3, 4, 5, 0, 2]) # TODO # TODO def findClosest(customers, customerNames, x): # TO DO return '' print(findClosest(customers, customerNames, mikaela)) # Should print Ben print(findClosest(customers, customerNames, brandon)) # Should print Ann 4. Numpy drones arr = np.array([-1, 2, -3, 4]) arr2 = np.square(arr) arr2 locations = np.array([[4, 5], [6, 6], [3, 1], [9,5]]) drones = np.array(["wing_1a", "wing_2a",…arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Programming Logic & Design ComprehensiveComputer ScienceISBN:9781337669405Author:FARRELLPublisher:CengageC++ for Engineers and ScientistsComputer ScienceISBN:9781133187844Author:Bronson, Gary J.Publisher:Course Technology PtrSystems ArchitectureComputer ScienceISBN:9781305080195Author:Stephen D. BurdPublisher:Cengage Learning
- EBK JAVA PROGRAMMINGComputer ScienceISBN:9781337671385Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENTMicrosoft Visual C#Computer ScienceISBN:9781337102100Author:Joyce, Farrell.Publisher:Cengage Learning,C++ Programming: From Problem Analysis to Program...Computer ScienceISBN:9781337102087Author:D. S. MalikPublisher:Cengage Learning
Programming Logic & Design Comprehensive
Computer Science
ISBN:9781337669405
Author:FARRELL
Publisher:Cengage
C++ for Engineers and Scientists
Computer Science
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Course Technology Ptr
Systems Architecture
Computer Science
ISBN:9781305080195
Author:Stephen D. Burd
Publisher:Cengage Learning
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
Microsoft Visual C#
Computer Science
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Cengage Learning,
C++ Programming: From Problem Analysis to Program...
Computer Science
ISBN:9781337102087
Author:D. S. Malik
Publisher:Cengage Learning
1.1 Arrays in Data Structure | Declaration, Initialization, Memory representation; Author: Jenny's lectures CS/IT NET&JRF;https://www.youtube.com/watch?v=AT14lCXuMKI;License: Standard YouTube License, CC-BY
Definition of Array; Author: Neso Academy;https://www.youtube.com/watch?v=55l-aZ7_F24;License: Standard Youtube License