Question
whats the answers

How many total integers elements are in an array with 4 rows and 7 columns? 07 28 11
What is the resulting array contents, assuming that itemList is an array of size 4 having contents -55, -1, 0, 9? for (i = 0;
Given an integer array myVals of size N_SIZE (i.e. int[] myVals = new int[N_SIZE]:), what does the following code do? minval
Given: int[] yearsArr = new int[4); yearsArr(0) - 1999; yearsArr(1) - 2012: yearsArr(2) - 2025; How many elements in memory d
Assume N is initially 1. What is the value of peoplePerDay[2]? peoplePerDay/N] - 15; N- N + 1; peoplePerDay(N) - peoplePerDay
Given the following enum type declaration public enum LightState (RED, GREEN, YELLOW, DONE) and the declaration LightState li
Given the following code, indicate js value at the end of the iteration i = 1? for (int i - 0; i < 5; ++i) { int j = 0; j-ji
Given the following while loop, what is the value assigned to variable z for the initial values of the variables a=1, b=1 and
Select the correct statement. Incremental programming may help reduce the number of errors in a program. Once a program is co
What is output by the following code? int row int col; for(row - 2; row < 3; row - row + 1) { for(col = 0; col <= 1; col - co
Given the following code, how many times will the inner loop body execute? int row; int col; for(row - 0; row < 2; row - row
0 0
Add a comment Improve this question Transcribed image text
Answer #1

1) OPTION C IS CORRECT

2) OPTION B IS CORRECT

3) OPTION C IS CORRECT

4) OPTION D IS CORRECT

5) OPTION C IS CORRECT

Add a comment
Know the answer?
Add Answer to:
whats the answers How many total integers elements are in an array with 4 rows and...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • whats the answers For the following code, indicate how many times the loop body will execute...

    whats the answers For the following code, indicate how many times the loop body will execute for the following input values: 2 1 0? userNum - 3 while (userNum > 0) { // Do something // Get user um from input } 3 Given the following code, how many times will the inner loop body execute? int row: int col; for (row = 0; row < 2; row - row + 1) { for (col = 0; col < 3;...

  • Consider the following matrix transpose routines: typedef int array[4][4]; void transpose (array dst, array src) {...

    Consider the following matrix transpose routines: typedef int array[4][4]; void transpose (array dst, array src) {     int i, j;     for (i=0; i<4; i++) {    for (j=0; j<4; j++) {           dst[i][j] = src[i][j];    }     } } void transpose2 (array dst, array src) {     int i, j;     for (i=0; i<4; i++) {    for (j=0; j<4; j++) {           dst[j][i] = src[j][i];    }     } } Assume this code runs on...

  • This is for Java. Create ONE method/function that will return an array containing the row and...

    This is for Java. Create ONE method/function that will return an array containing the row and column of the largest integer i the 2D array. If the largest number is located on row 2, column 1, the method needs to return row 2 and column one. Do not use more than one method. Use the code below as the main. Please comment any changes. in java Given the main, create a method that RETURNS the largest number found in the...

  • Which of the following can print out all elements in array? int[] [] items = {...

    Which of the following can print out all elements in array? int[] [] items = { {0, 1, 3, 4}, {4, 3, 99, 0, 7 }, {3, 2} }; for (int row=0; row < items.length; rowt) O { System.out.println(); for (int col=0; col < items.length; col++) System.out.print( items[row][col] + " "); } for (int row=0; row < items.length; row++) { System.out.println(); for (int col=0; col < items(col).length; col++) System.out.print( items[row][col] + " "); for (int row=0; row < items.length; row++)...

  • What is wrong with the following code that prints out the elements of a 2x3 array?...

    What is wrong with the following code that prints out the elements of a 2x3 array? for (int i 0; i < 3; ++i) { for (int j = 0; j < 2: ++j) { printf("x(%d] [%d] ". %.2f\n", i, j, x[i][j]); O Expression ali]li] is incorrect O There is nothing wrong with the code 0 %2t is invalid O It is printing for a 3x2 array

  • Consider the following code: *How many elements in the array A are * also in the...

    Consider the following code: *How many elements in the array A are * also in the array B? Assume B is sorted. */ 01: int overlap (int* A, int* B, int N) 02:{ 03: int count = 0; 04: for (int i = 0; i < N; ++i) 05: 06: int x A [i 07: 08 int pos lower_bound (B, B+N, x) - B; if (pos N && B [pos] 09: 10: 11: 12: == x ) { +count; 13:...

  • 7. The code segment given sorts an array. Show how this works on the given array...

    7. The code segment given sorts an array. Show how this works on the given array by redrawing the array each time one of the entries changes value. const int Isize·6; // list size int list [lsize]; int j, x; for (int i = !size-1; i > 0; i-) { x = list [i]; ji; for (int k = i-1 ; k >= 0; k-) { if (list [k] > x) f j -k; x = list(k); list [j] list...

  • Line number 9 contains the code line that declares the result array ( asked in another...

    Line number 9 contains the code line that declares the result array ( asked in another question of this exam). On Line number 11 where col_ contains the correct statement ( asked in another question of this exam) Question: Write the codeline (single line) to compute the matrix multiplication of "frstMatrix" and "scndMatrix". For this question you will write a code line for line number 17 1 package ok4; 2 //This java program multiplies two matrices 3 //represented with two...

  • 1. What is the output of the following code segment? int array[] = { 8, 6,...

    1. What is the output of the following code segment? int array[] = { 8, 6, 9, 7, 6, 4, 4, 5, 8, 10 }; System.out.println( "Index Value" ); for ( int i = 0; i < array.length; i++ ) System.out.printf( "%d %d\n", i, array[ i ] ); 2. What is the output of the following code segment? char sentence[] = {'H', 'o', 'w', ' ', 'a', 'r', 'e', ' ', 'y', 'o', 'u' }; String output = "The sentence...

  • 14 Points Bonus Question: Consider the following transpose routine: typedef int array (212): void transposel (array...

    14 Points Bonus Question: Consider the following transpose routine: typedef int array (212): void transposel (array dst, array sre) int i, j; for(i=0; i<2; i++) { for (-0; j 2; j++){ dst sre[BG); Assume that this code runs on a machine with the following properties: • sizeof(int) = 4 • The src array starts at address and the dst array starts at address 16 There is a single L1 cache that is direct-mapped, write through, write allocate, with a block...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT