Computers C++

posted by .

1.)

Consider the following array definition:

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

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

  • Computers C++ -

    2 (on its own line)

Respond to this Question

First Name
School Subject
Your Answer

Similar Questions

  1. C++

    #include <iostream.h> #include <stdlib.h> int main ( ) { int choice; cout << "Computer Repair" << endl; cout << "\n Does your ailing computer beeps multiable times at startup?
  2. C++

    #include <iostream.h> #include <stdlib.h> int main ( ) { int choice; cout << "Computer Repair" << endl; cout << "\n Does your ailing computer beeps multiable times at startup?
  3. C++ Programming

    Can any1 please fix this c++ source problem /*Circle Are program Calculates the area of a circle using the formula A=pi * r * r Sonny Hinh, 1/23/08 #include <iostream.h> int main() { cout << "-Calculate the area of a circle-" …
  4. programming C++

    Write a program that reads test scores up to 30 into an array. sentinel will stop when -1 is entered. Write functions that: 1. read the scores into arrays 2. computes the distribution based on whether they are As, Bs and so on 3. find …
  5. computer science

    The variable cp_arr has been declared as an array of 26 pointers to char. Allocate 26 character values, initialized to the letters 'A' through 'Z' and assign their pointers to the elements of cp_arr (in that order). int *arr1[26]={'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'}; …
  6. Computers C++ (2)

    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?
  7. Computers C++

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

    Would you check and correct my error please! ******************************* #include<iostream.h> #include<string.h> #include<bitset> viod Binary_to_Decimal(); int main(int argv,char argc) { while(1<2) { int m_choise; …
  9. computer science

    Writing a c++ program that stores the following values in five different variables:28,32,37,24,and 33.We have been ask to get the average of the series of values given above. Here I what I got /// This program calculates the sum and …
  10. Computer Science

    Please suggest corrections to this code: why isn't the loop continuing ANY help is appreciated! #include <iostream> #include <iomanip> using namespace std; int main () { double slope; int yint; int x; double cord; double …

More Similar Questions