Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.

What are other ways to declare an integer array named "a"?

3 Answers

Relevance
  • One
    Lv 6
    8 years ago
    Favorite Answer

    int[] a = new int[5]; //5 is size of array

    int[] a = {1,2,3,4,5};

  • 8 years ago

    theres two types of array,Single Dimension and Multi .

    if single dimension :

    int a[] = {10,13,24} ;

    the braces there means that it is an array.you will use that as index to acess it.

  • David
    Lv 6
    8 years ago

    Using a vector: http://en.cppreference.com/w/cpp/container/vector

        #include <vector>

        int main() {

            std::vector<int> a;

        }

Still have questions? Get your answers by asking now.