Addition of Array elements

void main()
    int arr[100], i, no,sum=0;
    printf("\nEnter the no. of elements: ");


Enter the no. of elements: 5
Enter element 1 : 1
Enter element 2 : 2
Enter element 3 : 3
Enter element 4 : 4
Enter element 5 : 5
Sum of Array element: 15

You may also like...

5 Responses

  1. Bryam says:

    Good example!

  2. nice very good example its helpful for me

  3. laurencev says:

    Example needlessly abbreviates identifiers. Needlessly reduces readability.

Leave a Reply

Your email address will not be published. Required fields are marked *

FREE C Programming Cheatsheet

FREE C Programming Cheatsheet


Cheatsheet for a quick glance at C programming concepts and syntax

Thank you! Check you inbox and access your cheat-sheet