Question

Lets say we have the following array: int gradesArray[10]; How would you print out all of the names contained in the array to
0 0
Add a comment Improve this question Transcribed image text
Answer #1
Answer:
for(int i = 0;i<10;i++){
    cout<<gradesArray[i]<<endl;
}
Add a comment
Know the answer?
Add Answer to:
Lets say we have the following array: int gradesArray[10]; How would you print out all of...
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
  • Write the code that will print out all elements in the int array called numbers, separated...

    Write the code that will print out all elements in the int array called numbers, separated by spaces, and a newline character after all elements are printed.

  • For Drosophila Melanogaster how to determine whether the loci are assorting independently (lets say we are...

    For Drosophila Melanogaster how to determine whether the loci are assorting independently (lets say we are talking about two traits, ebony body and curved wing) Would you have to perform a Chi-square testing for it?

  • 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++)...

  • Assume you have the following declaration (in main) : int num[10] [7]; Assume that array num...

    Assume you have the following declaration (in main) : int num[10] [7]; Assume that array num is filled completely. Write functions to perform each of the following: a) A function that prints all elements in the array that are greater than 10 or less than 50. b) A function that finds the largest number in the array and returns its subscript. c) A function that finds and returns the average of all the numbers in the array. d) A function...

  • 6. As a practical joke, a friend gives you an int array for your birthday. As...

    6. As a practical joke, a friend gives you an int array for your birthday. As if that weren’t bad enough, your friend tells you that the array contains almost all 0’s except for a small string of consecutive 1’s contained somewhere in the middle. Overwhelmed by the novelty of this you decide to write a function that will print out the location of the first 1 in the array, the location of the last 1 in the array, and...

  • Write C++ statements that will print out how many of the elements in array numbers are...

    Write C++ statements that will print out how many of the elements in array numbers are divisible by 3. Given array filled with values: int numbers[12]; TTT Arial • 3(121) #T.EE Pathp Words:0

  • Q1) How would you declare an array of doubles called myDoubles? Arrays can be initialized in...

    Q1) How would you declare an array of doubles called myDoubles? Arrays can be initialized in one of two ways. In one method, the array elements are placed in a list enclosed in curly braces after the array name definition. For example, the code below creates an array of ints with 3 elements: 1, 2 and 3. int[] a = {1, 2, 3, 4}; We can also initialize an array with a new construct, indicating how many elements we want...

  • Create an array size 10 and fill it with integers from 1 to 10. Print out...

    Create an array size 10 and fill it with integers from 1 to 10. Print out the values. Then, create a pointer that points to the beginning of the array. Finally, print out all the values through a pointer and the memory address where the value is. With C

  • You have two factories that produce identical products (lets say plastic forks). The plants and equipment...

    You have two factories that produce identical products (lets say plastic forks). The plants and equipment are fully depreciated and there are no fixed costs. As a result, your cost basis in the USA is TCusa = 3Yusa^2 your cost basis in CHINA is TCchina = Ychina^2 The demand for plastic forks is Y=80 a. With no restrictions (competitive markets exist) how many plastic forks will the USA produce? 2 Points b. How much would China need to lower their...

  • 1- Lets say you have a new reaction and you think that the reaction has a...

    1- Lets say you have a new reaction and you think that the reaction has a rate equation: Rate = k[A]2 However, you only have one set of [A] vs time data. Describe how you would determine what the rate equation is from this one set of data. 2- For a first order reaction, graph the concentration of reactant A ([A]) vs time. On this same graph indicate two half-life time periods. (That is show where the concentration falls by...

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