The most commonly used arrays in business applications are ____-dimensional and ____-dimensional.
|
||||||||
If N is the number of variables in an array, the last variable of the array is assigned a subscript of ____.
|
||||||||
The statement ____ assigns the character X to the first element of the letters array.
|
||||||||
A subscript is also called a(n) ____.
|
||||||||
When using bubble sort to sort an array in ascending order, at the end of the first pass, the ____ value is stored in the last position of the array.
|
||||||||
____ declares and initializes a four-element string array named sales; each element is initialized to 0.0.
|
||||||||
A(n) ____ is a group of variables that have the same name and data type and are related in some way.
|
||||||||
To pass a scalar variable by reference in C++, you need to include the ____ operator before the formal parameter’s name in the receiving function’s header.
|
||||||||
A unique number called a(n) ____ identifies each variable in a one-dimensional array.
|
||||||||
Assigning initial values to an array is often referred to as ____ the array.
|
Trending nowThis is a popular solution!
Step by stepSolved in 2 steps
- 2. Lottery Number Generator Design a program that generates a 7-digit lottery number. The program should have an Integer array with 7 elements. Write a loop that steps through the array, ran- domly generating a number in the range of 0 through 9 for each element. (Use the random function that was discussed in Chapter 6.) Then write another loop that displays the contents of the array.arrow_forward:)and :( Disply :) Display Array Information 10 20 30 40 50 -Exit- And shows the following on clicking the buttons: => Here you are with Smiley Faces: :):):):):) :):):):):) :):):):):) => Here you are with Array Information: => And the Sum is: 150 I am exiting the program == BYE == Requirements: • Create an event handler for each button click. Create a method named DisplaySmileys for Displaying Smileys. Create a method named DisplaymyArray for Displaying the Array's content and the sum of the elements. Make sure to include a copy of the output (Window and Text)arrow_forwardC++ program This assignment is about array operations. Create an array with 1000 items and fill it with random numbers from the range of -100, 100 (including -100 and 100). Then, your program asks user to enter a number. The program keeps running until user enters a out-of-range (-100,100) number. An example run is given below. Enter a number: -4Frequency of -4: 54Enter a number: 4Frequency of 4: 15Enter a number: 35Frequency of 35: 8Enter a number: 43Frequency of 43: 2Enter a number: 101Bye...arrow_forward
- 2. What is the error in the following pseudocode? // This program displays the highest value in the array. Declare Integer SIZE = 3 Declare Integer values [SIZE] = 1, 3, 4 Declare Integer index Declare Integer highest For index = 0 To SIZE - 1 If values[index] > highest Then Set highest = values[index] End If End For Display "The highest number is ", highestarrow_forwardMatch each data operator with its function: OFFSET Returns the number of the elements in an array. TYPE Returns the size of a variables byte. SIZEOF Returns the memory adress of a variable. LENGTHOF Returns number of bytes used in an array.arrow_forwardWrite C code for a program that does the following: Create a character array that displays the message "My Friends Ages Program" at the declaration Create a second array that will store 4 integer values Use assignment statements to store the following friend's ages ages[0] = 25 ages[1] = 27 ages[2] = 24 ages[3] = 26 Use a puts() statement to display the message in the first bullet Use a for() statement to display each age stored in the array element The end output statement should display the friend's ages.arrow_forward
- In general, the index of the first element in an array is __________a) 0b) -1c) 2d) 1arrow_forwardCreate Array of Random Dates In this task you are required to write a function that will generate a column array (a variable called dates) containing N random dates. N is an integer (whole number) entered by the user and will indicate to the function how many random dates the user requires. The dates array will be structured as follows: • The array shall have two columns; column 1 will contain numbers indicating the day of each month (1-31) and column 2 will contain numbers indicating the month (Jan 1, Feb=2, Mar = 3.... Dec = 12). . Each day must be randomly generated (using the randi() function) taking into account the maximum number of days in each month (i.e. Jan, Mar, May, Jul, Aug. Oct and Dec have 31 days, Apr. Jun, Sep and Nov have 30 days and Feb will have 28 days). You must use an if-elseif-else statement to decide this. • We are assuming no leap years (e. February can only have days between 1-28). For example, the output from calling the function: output = dategen (3) could…arrow_forwardpython: numpy def purchases(transactions): """ QUESTION 7 - A high-end store is trying to evaluate the total amount that customer's spend per transaction. They want customers to spend anywhere between $130 and $150 on average. - You need to determine whether the average number spent on each transaction per month is above, between, or below the desired amount. - Transactions is a numpy array containing a date, total amount earned each month, and total number of transactions each month. - Above: month's average amount spent per transaction > 150 - Within Range: 150 >= month's average amount spent per transaction >= 130 - Below: month's average amount spent per transaction < 130 - Return a numpy array with "Above", "Within Range" and "Below" for the average amount spent per transaction per month - THIS MUST BE DONE IN ONE LINE HINT: use np.where() and convert the type of each column to float Args: transactions…arrow_forward
- In visual basic Create an array that will hold 10 integer values.arrow_forwardWeight Statistics Write a program that monitors monthly weight loss each of 12 months into an array of doubles. The program should calculate and display the total weight loss for the year, the average monthly weight loss, and the months with the highest and lowest amounts. Input Validation: Do not accept negative numbers for monthly weight loss.arrow_forwardWhen traversing an array, which of the following statements does not need to keep track of the individual array subscripts: Do...Loop, For...Next, or For Each...Next?arrow_forward
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education