Array Single Dimmension Multidimmension Stack Queue
Array Single Dimmension Multidimmension Stack Queue
SINGLE DIMMENSION
MULTIDIMMENSION
STACK
QUEUE
Reasoning
There is a need to handle similar types of data for
example 100 pieces
One method is to create similar data 100 times
Array is very important part of programming
Variable can be identified by the index (subscript)
of the variable
Array formatting
Syntax on program:
data_type array_name[array_size];
Example:
int age[5];
There are five variables of integer with subscripts
from 0 – 4
Initializing an array:
int age[5]={2,4,34,3,4};
int age[]={2,4,34,3,4};
Compiler will determine the size for the 2nd part
Array example
#include <stdio.h>
void main()
{
int age[]={2,67,4,35,21};
int i;
int sum_age = 0;