Arrays An array is a collection of items stored at contiguous memory locations. The idea is to declare multiple items of the same type together. Array declaration: In C, we can declare an array by specifying its and size or by initializing it or by both. int arr[10]; // Array declaration by specifying size int arr[] = {10, 20, 30, 40}; // Array declaration by initializing elements int arr[6] = {10, 20, 30, 40} // Array declaration by specifying size and initializing elements Formulas: Length of Array = UB - LB + 1 UB = Upper bound LB = Lower bound Given the address of the first element, the address of any other element is calculated using the formula:- Loc (arr [k]) = base (arr) + w * k w = number of bytes per s...
a person who writes code for computer programs is real programmer..