
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
![I. Which commands would output 19 if use on the following 2D array?
int[][] i = new int[7][19];
a) i[O].size()
b) i[O].length()
c) i.size()
d) i[O].length
e) i.length()
f) i.length](https://content.bartleby.com/qna-images/question/7355d962-0fce-4254-b762-05ebe0225361/214b42ae-6be3-4298-80d2-4c420b6956b1/mp6vyt_thumbnail.png)
Transcribed Image Text:I. Which commands would output 19 if use on the following 2D array?
int[][] i = new int[7][19];
a) i[O].size()
b) i[O].length()
c) i.size()
d) i[O].length
e) i.length()
f) i.length
Expert Solution

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

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
- The Problem: strcat is unsafeThe following code overflows the array name and corrupts memory.// Bad codechar name[10];strncpy(name, "Oualline", sizeof(name));name[sizeof(name)-1] = '\0';strcat(name, ", ");strcat(name, "Oualline);// Memory is now corrupt Note: Defining an array using a numeric constant (10) instead of a named constant (NAME_SIZE) is bad programming practice. But it does make the example simpler, so it's good writing practice when explaining a hack.arrow_forwardint[] numList = new int [50]: for (int i = 0; i < 50; i++) numList[i] 2 * i: num[10] = -20; num(30] = 8; 40. What is the value of numList.length in the array above? b. 30 d. 50 41. Which ofthe following statements creates alpha, an anray of 5 components of the type int, and initializes each component to 10? (i) int [] alpha = {10, 10, 10, 10, 10); (ii) int (5] alpha = (10, 10, 10, 10, 10} a. Only (i) b. Only (ii) c. Both (i) and (ii) d. None of these 42. Consider the following declaration. int[] list = (2, 5, 7, 8, 12, 13, 15, 18, 22, 25}; %3D Which of the following correctly finds the sum of the clements of list? () for (int j = 0; j < 10; j++) sum = sum list[j]; for (int j = 1; j <= 10; j++) %3D sum + list [j); uns a. Only (i) b. Only (ii) c. Both (i) and (ii) d. None of these 43. What is the function of the reserved word class? It defines a data type and allocates memory. b. It defines only a data type; it does not allocate memory. It acts as a modifier. a. c. d. It has no function.…arrow_forwardDefine the array printed below using the np.array() function, and assign it to the variable 'my_array' (only one line of code needed). [[0, 2, 4],[9, -6, 5],[0, 0, -10]]arrow_forward
- write only the code required to multiply the number 8 to each array value in the array and print the results on the console Int[][] myArray = {{23, 54, -21}, {11, 35, 42}, {7, 18}}; //write your code herearrow_forwardWe have an array variable ‘var’ int var[4] = {25,20,30,40}; Find the memory address of the first element of in the array: var[0]arrow_forward13. What is the value of UTM[3]? int UTM[] = {19, 10, 8, 17, 9}; А. 19 В. 10 С. 8 D. 17 14. Which of the following statement is TRUE? float x[3][4]; A. The array can hold 7 elements. B. Array x will have 3-rows and 4-columns C. The array can hold a umber with more nine decimal points. D. None of abovearrow_forward
- Which of the following are true about arrays? Arrays are reference types. Array indexing is bounds‐checked. Arrays sometimes can be created without using new. The entire contents of an array can be copied via =.arrow_forward1. How would you initialize a 2D array of doubles called height Weight that represents the height and weight of the 25 members of the UNC Charlotte football team? (select all that apply) A. double[][] heightWeight = new double[25] [25]; B. double[][] heightWeight = new double[25][2]; C. double[] heightWeight = new double[50]; D. double[][] heightWeight = new double[2][25];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