Addition of Array elements:



main()
{
    int r[5];
    int k;

    clrscr();

    for(k=0;k<=4;k++)
    {
        printf("Enter the Number : ");
        scanf("%d",&r[k]);
    }
    for(k=0;k<=4;k++)
    {
        printf("\n %d",r[k]);
    }
getch();
}

Output: