Introduction to Java Programming and Data Structures, Comprehensive Version (11th Edition)
11th Edition
ISBN: 9780134670942
Author: Y. Daniel Liang
Publisher: PEARSON
expand_more
expand_more
format_list_bulleted
Concept explainers
Textbook Question
Chapter 8.8, Problem 8.8.2CP
Assume char[][][] x =new char[12][5][2], how many elements are in the array? What are x . 1ength, x [2] . 1ength, and x [0] [0] . 1ength?
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
4. Consider the arrays in Question 2. List the elements of arry1[ ] after doing the following code:
arry1[1]+=2;
Answer:
5. Declare a 2D array with 5 rows and 6 columns?
Given the array:
array, 5> A1 = { 18, 4, 5, 6, 67, 22, 44, 89, 14, 7, 33, 49, 12, 5, 110 };
What is element A1[5][3]
O 89
O 49
0 5
0 7
Undefined
What is the value of scores[2][3] in the following array?
int [] [] scores = { {88, 80, 79, 92}, {75, 84, 93, 80},{98, 95, 92, 94}, {91, 84, 88, 96} };
Chapter 8 Solutions
Introduction to Java Programming and Data Structures, Comprehensive Version (11th Edition)
Ch. 8.2 - Declare an array reference variable for a...Ch. 8.2 - Prob. 8.2.2CPCh. 8.2 - What is the output of the following code? int[] []...Ch. 8.2 - Which of the following statements are valid? int...Ch. 8.3 - Show the output of the following code: int[][]...Ch. 8.3 - Show the output of the following code: int[][]...Ch. 8.4 - Show the output of the following code: public...Ch. 8.5 - Prob. 8.5.1CPCh. 8.6 - What happens if the input has only one point?Ch. 8.7 - What happens if the code in line 51 in Listing 8.4...
Ch. 8.8 - Declare an array variable for a three-dimensional...Ch. 8.8 - Assume char[][][] x =new char[12][5][2], how many...Ch. 8.8 - Show the output of the following code: int[][][]...Ch. 8 - (Sum elements column by column) Write a method...Ch. 8 - (Sum the major diagonal in a matrix) Write a...Ch. 8 - (Sort students on grades) Rewrite Listing 8.2,...Ch. 8 - (Compute the weekly hours for each employee)...Ch. 8 - (Algebra: add two matrices) Write a method to add...Ch. 8 - (Algebra: multiply two matrices) Write a method to...Ch. 8 - (Points nearest to each other) Listing 8.3 gives a...Ch. 8 - (All closest pairs of points) Revise Listing 8.3,...Ch. 8 - Prob. 8.9PECh. 8 - (Largest row and column) Write a program that...Ch. 8 - (Game: nine heads and tails) Nine coins are placed...Ch. 8 - (Financial application: compute tax) Rewrite...Ch. 8 - (Locate the largest element) Write the following...Ch. 8 - (Explore matrix) Write a program that prompts the...Ch. 8 - (Geometry: same line ?) Programming Exercise 6.39...Ch. 8 - (Sort two-dimensional array) Write a method to...Ch. 8 - (Financial tsunami) Banks lend money to each...Ch. 8 - (Shuffle rows) Write a method that shuffles the...Ch. 8 - (Pattern recognition: four consecutive equal...Ch. 8 - Prob. 8.20PECh. 8 - (Central city) Given a set of cities, the central...Ch. 8 - (Even number of 1s) Write a program that generates...Ch. 8 - (Game: find the flipped cell) Suppose you are...Ch. 8 - (Check Sudoku solution) Listing 8.4 checks whether...Ch. 8 - Prob. 8.25PECh. 8 - (Row sorting) Implement the following method to...Ch. 8 - (Column sorting) Implement the following method to...Ch. 8 - (Strictly identical arrays) The two-dimensional...Ch. 8 - (Identical arrays) The two-dimensional arrays m1...Ch. 8 - (Algebra: solve linear equations) Write a method...Ch. 8 - (Geometry: intersecting point) Write a method that...Ch. 8 - (Geometry: area of a triangle) Write a method that...Ch. 8 - (Geometry: polygon subareas) A convex four-vertex...Ch. 8 - (Geometry: rightmost lowest point) In...Ch. 8 - (Largest block) Given a square matrix with the...Ch. 8 - (Latin square) A Latin square is an n-by-n array...Ch. 8 - (Guess the capitals) Write a program that...
Additional Engineering Textbook Solutions
Find more solutions based on key concepts
(Temperature Conversions) Implement the following integer methods: Method celsius returns the Celsius equivalen...
Java How To Program (Early Objects)
Consider the following union declaration: This declaration illustrates that structures can be embedded within u...
Computer Systems: A Programmer's Perspective (3rd Edition)
Male and Female Percentages Write a program that asks the user for the number of males and the number of female...
Starting Out with Python (4th Edition)
Put back the word public, and then check whether it is possible to leave out the word class by trying to compil...
Objects First with Java: A Practical Introduction Using BlueJ (6th Edition)
Describe two properties that each candidate key must satisfy.
Modern Database Management (12th Edition)
A set of standard diagrams for graphically depicting object-oriented systems is provided by ____. a. the Unifie...
Starting Out with Programming Logic and Design (5th Edition) (What's New in Computer Science)
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
- import array as arr a=arr.array(i,[2,4,6,8,10,12,14,16,18,20,22,24,26,28,30]); a.insert(2,1) print(a[2]) What value will be in the index position 2? 2 814arrow_forwardgiven the array: int arr[ ][ ] ={ { 1, 2, 3 }, { 4, 5, 6 }, { 7, 8, 9 }, { 10, 11, 12 } }; what is in arr[2][1] ? a-11 b-5 c-8 d-9 e-7arrow_forwardusing java programming int a[] = {5,10,4,20,1,7}; 1- search for the smallest element in array 2-if you found the smallest element in the array :swap the first element with the smallest elementarrow_forward
- What is the value of x[6] if an array is declared and initialized as follows: double x [ ] = {6.6, 3.3, 9.9, 9.6, 6,7, 3.2, 7.7, 8.1};arrow_forwardHow many elements are there in arrays x, y, and z? int x[27]; const int base = 10; int y[base + 5]; int z[100][100][100];arrow_forwardAn array is given as int x[6] = {19, 10, 8, 17, 9, 15};, what is x[4]arrow_forward
- For these three arrays: int A[4][3] = {4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48} and int B[4][3] = {5, 8, 11, 14, 17, 20, 23, 26, 29, 32, 35, 38} Perform the following operation on A and B: int C[4][3] = A[4][3] + 2*B[4][3]. Then the value in C[3][2] is: _______arrow_forwardGiven the following array declaration: int myArray[10]={1,2,3,4,5,6,7,8,9,10}; How would you reference the 3 in the array?arrow_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_forward
- What does the array arr contain after the following code segment is executed? Show the content of the entire array for full credit int[] arr = new int[8]; arr[1] arr[3] arr[7] = 3; = 11; 5; int x arr[1] + 1; %3D 44; arr[x] arr[arr[7]] = 7;arrow_forwardvoid changeAll(int x[]) { x[0] = x[0] + 5; return; The first element in an array would be increased by 5 The array would be the same because it was passed by value x would be increased by 5 All the elements in the passed array would be incremented by 5arrow_forwardAssume bool x[2][4] = {{false, false, false, false}, {false, false, false, false}} what is the index variable for the element at the last row and last column in array x? Select an option: x[1][4] x[1][3] x[2][3] x[2][4]Type:MAarrow_forward
arrow_back_ios
SEE MORE QUESTIONS
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
9.1: What is an Array? - Processing Tutorial; Author: The Coding Train;https://www.youtube.com/watch?v=NptnmWvkbTw;License: Standard Youtube License