int foo [] = { 16, 2, 77, 40, 12071 };
int foo [5];
// Array declaration by initializing elements int arr[] = { 10, 20, 30, 40 } // Compiler creates an array of size 4. // above is same as "int arr[4] = {10, 20, 30, 40}"
int foo [5] = { 16, 2, 77, 40, 12071 };
// datatype var_name[howmuch value you need to store] = {values, values} int a[5] = {1, 2 3, 4, 5};