Question

1. What is an array? Is there a difference between a variable vs array? What is...

1. 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]?

0 0
Add a comment Improve this question Transcribed image text
Answer #1

1 Array array is a data structure contains the group & elements which are all of the same data type. And the elements are sto* This error is actured while a programmer makes mistakes using e-, or fails to take into account that sequence starts at à r

Add a comment
Know the answer?
Add Answer to:
1. What is an array? Is there a difference between a variable vs array? What is...
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
  • Part I Short Answer (50 points) 1. Write a pseudocode declaration for a String array initialized...

    Part I Short Answer (50 points) 1. Write a pseudocode declaration for a String array initialized with the following strings: “Einstein”, “Newton”, “Copernicus”, and “Kepler”. 2. Assume names in an Integer array with 20 elements. Write a pseudocode algorithm a For Loop that displays each element of the array. 3. Assume the arrays numberArray1 and numberArray2 each have 100 elements. Write a pseudocode algorithm that copies the values in numberArray1 to numberArray2 . 4. Write a pseudocode algorithm for a...

  • Task 1 Main Function: Declare and fill an array with 1000 random integers between 1 -...

    Task 1 Main Function: Declare and fill an array with 1000 random integers between 1 - 1000. You will pass the array into functions that will perform operations on the array. Function 1: Create a function that will output all the integers in the array. (Make sure output is clearly formatted. Function 2: Create a Function that will sum and output all the odd numbers in the array. Function 3: Create a Function that will sum and output all the...

  • Which of the following statements is true about this array declaration? Declare Integer numbers [5] =...

    Which of the following statements is true about this array declaration? Declare Integer numbers [5] = 123,456,789,321, 654 This is an error: there should be 6 integers in the array. This is an array declaration and initialization. This is an error; the values of the array should be 1, 2, 3, 4,5 0 None of these statements are true.

  • Diagonal Difference HackerRank Pseudocode and C++: Given a square matrix, calculate the absolute difference between the...

    Diagonal Difference HackerRank Pseudocode and C++: Given a square matrix, calculate the absolute difference between the sums of its diagonals. Function Description Complete the diagonalDifference function described below to calculate the absolute difference between diagonal sums. diagonalDifference( integer: a_size_rows, integer: a_size_cols, integer array: arr) Parameters: a_size_rows: number of rows in array a_size_cols: number of columns in array a: array of integers to process Returns: integer value that was calculated Constraints -100 < = elements of the matrix < = 100...

  • 1.The following statement gets an element from position 4 in an array named myArray: x =...

    1.The following statement gets an element from position 4 in an array named myArray: x = myArray[4]; What is the equivalent operation using an array list named list.? A x = list.get(); B x = list.get(4); C x = list.get[4]; D x = list[4]; 2.Consider the following code snippet: ArrayList<Integer> num1 = new ArrayList<Integer>(); int data; Scanner in = new Scanner(System.in); for (int i = 0; i < 5; i++) { data = in.nextInt(); num1.add(data); if (data == 0 &&...

  • Array Vs Symbol Table Comparison Code A) B) C) D) What is the key difference between...

    Array Vs Symbol Table Comparison Code A) B) C) D) What is the key difference between an array and a symbol table? Assume you have a bunch of objects containing information about different SER classes and need to store their data somewhere. You could use their course number as a key and then store them into either an array or symbol table - which would be better if you wanted to quickly print out all of the classes? Explain. Show...

  • What algorithm does this code perform please help out ASAP. You can add code and output...

    What algorithm does this code perform please help out ASAP. You can add code and output but I really need what algorithm it is performing 4. What algorithm does the following pseudocode perform? Declare Integer startscan Declare Integer minIndex Declare Integer minValue Declare Integer index For startScan = 0 To arraysize - 2 set minindex = startscan Set minValue = array [startscan] For index startscan 1 To arraySize 1 If array[index] < minValue Set minValue array [index] Set minIndex-index End...

  • TRUE/FALSE 1. If pl is an integer pointer variable, with the value of 1000, pl++ changes...

    TRUE/FALSE 1. If pl is an integer pointer variable, with the value of 1000, pl++ changes P1 to point to the memory location 1001. ANSWER: T 2. When you return a dynamic array to the freestore, you must include the number of elements in the array 3. You can assign an array to a pointer variable. 4. The size of dynamic arrays must be declared at compile time. 5. int *pl; declares a static variable. ANSWER: F ANSWER: F ANSWER:...

  • In the array declared below the element considered to be in the last row and last...

    In the array declared below the element considered to be in the last row and last column can be accessed by what command Declare Integer values[3][4] a-values[0][0] b-values[3][4] c-values[2][3] d-values[size of value][size of values]

  • Lab Topics • The basics of Array object Use the following Coding Guidelines • When declaring...

    Lab Topics • The basics of Array object Use the following Coding Guidelines • When declaring a variable, you usually want to initialize it. Remember you cannot initialize a number with a string. Remember variable names are case sensitive. Use tabs or spaces to indent code within blocks (code surrounded by braces). Use white space to make your program more readable. Use comments after the ending brace of classes, methods, and blocks to identify to which block it belongs. Problem...

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