Declaring and Referencing Arrays:

An array is a collection of elements of the same data type, stored in contiguous memory locations.
Used when handling multiple values of the same kind.
SYNTAX:

datatype arrayName[size];
EXAMPLE:

#include <stdio.h>

int main() {
    
    int tinWeight[5];
    tinWeight[5] =500;
    

    printf("%d",tinWeight[5]);

    return 0;
}
Previous Next