
Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
expand_more
expand_more
format_list_bulleted
Concept explainers
Question
![Assume you have created a two-dimensional array, called names, where all rows have the same number of columns. Which of the following
expressions will provide you with the number of columns in the array?
names.length
names[1][1].length
None of the other answers are correct.
names.length.length
names[1].length](https://content.bartleby.com/qna-images/question/6e7678eb-8065-40b2-b3bf-4a03ebf783be/23860e05-232c-4bf0-846c-6fd63689c336/1270xbi_thumbnail.png)
Transcribed Image Text:Assume you have created a two-dimensional array, called names, where all rows have the same number of columns. Which of the following
expressions will provide you with the number of columns in the array?
names.length
names[1][1].length
None of the other answers are correct.
names.length.length
names[1].length
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution
Trending nowThis is a popular solution!
Step by stepSolved in 2 steps

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
- How can you determine the number of elements in a two-dimensional array?a. Multiply the number of rows in the array by the number of columns.b. Add the number of rows in the array to the number of columns and then multiplythe result by 2.c. Add the number 1 to the number returned by the array’s GetUpperBound method.d. none of the abovearrow_forwardCreate a two-dimensional array of integers called grades. It should consist of 30 rows and 10 columns.arrow_forwardProgramming language: Processing from Java Question attached as photo Topic: Use of Patial- Full Arraysarrow_forward
- Please chose the right option.arrow_forwardArray a is an integer array with all the elements in ascending order. The element at position 15 is the 15th largest and also the 15th smallest. You can assume integers are 4 bytes long. How many bytes are there in the array? O 116 124 O None of the other answers is correct. 120arrow_forward1. What is an array? Is there a difference between a variable vs array? What is an off by one error? 2. Look at the following pseudocode: constant integer SIZE = 3 Declare integer numbers[SIZE] = 1, 2, 3 a. What value is stored in numbers[2]? b. What value is stored in numbers[0]?arrow_forward
- Which of the following lines of code returns an error? A numpy.array (x) B) none of these (C) np.array (x) (D) array (x)arrow_forwardProgram: Using a multidimensional array, create a triangular-shaped array. You will ask the user how many lines they want to see and then create the array, fill it, and then print it. You will fill the array with one 1 in the first row, two 2’s in the second row, etc. This should work for any integer that the user enters. (Just because I am starting on 1 does not mean row 0 was skipped.) You must: use a loop to create the array shape. You must: use nested for loops to fill the array and to print the values back to the screen. Your program should print as shown below. Example Output: How many lines would you like in your triangle? >>>9 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 8 8 8 8 8 8 9 9 9 9 9 9 9 9 9 If your code looks like the code below, it is not what I’m asking for. The code below is making a square multidimensional array, not a triangular one. The code below is just leaving certain spots empty so that it looks like a triangle. I will ask you…arrow_forwardPlease write a program to find the following values form the array:int a[] = {20, 34, 18, 9, 43, 22, 16, 45}; The sum value of the array The average value The maximum value of the array The minimum value of the arrayarrow_forward
- Which statement declares a two-dimensional integer array called myArray with 3 rows and 4 columns? a. intmyArray[3,4]; b. int[]myArray=newint[7]; c. int[][]myArray=newint[3][4]; d. int[]myArray=newint[4][3]; JAVAarrow_forwardCode to how do you total all of the matching integer elements in an array?. ASAP.arrow_forwardUsing Java Write an app that allow data entry into an array. 1 Ask the user how many numbers they want to add. 2 Allocate an array of doubles to the specified size. 3 Prompt the user for the numbers to populate the array. 4 Calculate the total and the average of the values.arrow_forward
arrow_back_ios
arrow_forward_ios
Recommended textbooks for you
- 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

Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education

Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON

C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON

Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning

Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education