Question

aib. An array named prices [10] has following 10 values stored in it. 1.1, 2.2, 3, 4, 5, 6, 7, 8, 9, 10. Give the values of the following: prices 5 2. prices [2] 3. (prices +5) b, *(grades 12) e


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

I am assuming you are using c/c++ and

if type of array is float

a 6.000000

b 3.000000

c . *(prices+5) => prices[5] = 6.000000

if type of array is int

a 6

b 3

c 6

Add a comment
Know the answer?
Add Answer to:
An array named prices [10] has following 10 values stored in it. 1.1, 2.2, 3, 4,...
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
  • Draw a picture of array A, showing the values stored in it after execution of each...

    Draw a picture of array A, showing the values stored in it after execution of each code segment below. Use the following data: 0 1 2 3 4 5 6 7 8 9 int A[4][2]: int k, m: for (int i = 0: i < = 3: i++) for (int j = 0: j < = 1: j++) A[i][j] = 0: for (int j = 1: j < = 10: j++) { cin > > k: switch (k) { case...

  • In an 2D array I have the following data stored. Now I have to do code...

    In an 2D array I have the following data stored. Now I have to do code in C language to do the following: If distance between 1 &4 and 5&8 in any line is greater than 2 , then delete that row. And then update the 2D array. If there is no pair of 1 &4 or 5&8 in any row skip that row. Please help to do the code in C. 0 1 2 3 4 9 0 1...

  • Consider the following max-heap stored as an array: <7, 6, 4, 2, 5, 1, 3>. Draw...

    Consider the following max-heap stored as an array: <7, 6, 4, 2, 5, 1, 3>. Draw this max-heap as an (undirected) binary tree and give both adjacency-list representation and adjacency-matrix representation of the binary tree

  • Suppose an array contains the sequence of values 4, 5, 6, 7, 8, and 10. If...

    Suppose an array contains the sequence of values 4, 5, 6, 7, 8, and 10. If the binary search algorithm is used to search the array, how many elements must be visited to determine that element 3 is not in the array? Select one: a. 4 b. 6 c. 3 d. 5

  • 1. Declare an array of five integers named boxes. 2. what do you type to access...

    1. Declare an array of five integers named boxes. 2. what do you type to access the third element in the boxes array? 3. what do you type to assign the number 10 to the 5th element in the boxes array? 4. Declare an array named cartons that contains these values: 4.2 , 3.1, 6.8 5. what is the subscript value of 6.8 in the cartons array? 6. what will this program output if is in a complete program? cout<<...

  • 1. Write a static method named mode that takes an array of integers as a parameter...

    1. Write a static method named mode that takes an array of integers as a parameter and that returns the value that occurs most frequently in the array. Assume that the integers in the array appear in sorted order. For example, if a variable called list stores the following values: ist -3, 1, 4, 4, 4, 6, 7,8, 8, 8, 8, 9, 11, 11, 11, 12, 14, int 141i Then the call of mode (li array, appearing four times. st,...

  • a) Declare and instantiate an array named scores of twenty-five elements of type int.   (b)Write a...

    a) Declare and instantiate an array named scores of twenty-five elements of type int.   (b)Write a statement that declares an array namedstreetAddress that contains exactly eighty elements of typechar. 2. In a single statement: declare, create and initialize an arraynamed a of ten elements of type int with the values of the elements (starting with the first) set to 10, 20,..., 100 respectively. 3. Declare an array reference variable, week, and initialize it to an array containing the strings "mon",...

  • In assembly language, reverse an array of integers: # The array will be stored in memory...

    In assembly language, reverse an array of integers: # The array will be stored in memory # The location of arr[0] is SP # The location of arr[1] is SP+1 # The location of arr[2] is SP+2 # ... and so on # The size of the array N will be stored in SP-1 # The SP register may be initialized to any value 2: 1024; # Initialize the SP register to 1024 (start of the array) # ALL other...

  • JAVA 1.Write a static method named getMaxEven(numbers) which takes an array of positive integers as a...

    JAVA 1.Write a static method named getMaxEven(numbers) which takes an array of positive integers as a parameter. This method calculates and returns the largest even number in the list. If there are no even numbers in the array, the method should return 0. You can assume that the array is not empty. For example: Test Result int[] values = {1, 4, 5, 9}; System.out.println(getMaxEven(values)); 4 System.out.println(getMaxEven(new int[]{1, 3, 5, 9})); 0 public static int --------------------------------------------------------------------------------- 2. Write a static method...

  • JAVA Given the sequence of in-order traversal for a general binary tree, stored in an array...

    JAVA Given the sequence of in-order traversal for a general binary tree, stored in an array inOrder[] = {9, 5, 1, 7, 2, 12, 8, 4, 3, 11 }. And given the sequence of post-order traversal for the same tree, stored in an array postOrder[] = {9, 1, 2, 12, 7, 5, 3, 11, 4, 8}. Please implement the following method: static BinaryTree buildTree(Object inOrder[], Object postOrder[]) -The method buildTree() returns a BinaryTree object in memory that is constructed on...

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
Active Questions
ADVERTISEMENT