Post a New Question

Computers C++ (2)

posted by .

Thank You Steve For All The Help!
(If its you helping me with this one)

1.)

Consider the following array definition:

int values[ 5] = { 4, 7, 6, 8, 2 };

What does the following statement display?
cout << ( values[ 2] + values[ 3]) << endl;

2.)

Consider the following array definition:

int values[ 5] = { 4, 7, 6, 8, 2 };

What does the following statement display?
cout << ++ values[ 1] << endl;

  • Computers C++ (2) -

    14
    7


    Have you tried actually running the code?
    As my first boss used to say, "One measurement is worth a thousand expert opinions."

Respond to this Question

First Name
School Subject
Your Answer

Similar Questions

  1. Computers

    //program that puts two lists in order in one single list with all the numbers in order import java.util.Scanner; public class listOrder { public static void main (String [] args){ int [] list1; int [] list2; int [] list3; int temp; …
  2. programming

    I really need help in this it makes me confuse.I should make a program to find a pattern...so can somebody help me... Write a function to recognize an pattern within another array. Your function should have the following prototype. …
  3. Programming Language

    Create a method called countSelected, which takes an array of integers and an integer as input parameters and returns the number of occurences of the integer in the array. Example: data:{2, 1, 1, 8, 1, 0} select:1 ==> 3 public int …
  4. C++ Programming

    Design and create a class named Stats that has an array of 12 doubles as one of its member variables. The values in the array should be set by making 12 calls to a public member function named setValue that accepts two arguments, an …
  5. C#

    5) Suppose you have declared an integer array named scores and you make the following method call: TotalScores(scores, num : 1); Of the following overloaded method definitions, which would execute?
  6. shabou

    Can someone please make a Binarytree of these methodes in Java?
  7. computer science

    9.10: Reverse Array Write a function that accepts an int array and the array’s size as arguments. The function should create a copy of the array, except that the element values should be reversed in the copy. The function should …
  8. Computers C++

    1.) Consider the following array definition: int values[ 5] = { 4, 7, 6, 8, 2 }; What does the following statement display?
  9. Computers C++

    1.) Look at the following array definition. int numbers[] = { 2, 4, 6, 8, 10 }; What will the following statement display?
  10. computers - Programming

    Create a program that uses two parallel one-dimensional arrays. The program displays a shipping charge that is based on the number of items ordered by a customer. The shipping charge scale is shown in Figure 1 below. Store the maximum …

More Similar Questions

Post a New Question