C program to print the sum of all numbers in a given array
kw.c
#include<stdio.h>intmain(){intsum=0;intarr[5]={100,15,8,45,93};for(inti=0;i<5;i++){sum=sum+arr[i];}printf("The addition of a given array is %d ",sum);return0;}
Output
kodingwindow@kw:~$ gcc kw.c kodingwindow@kw:~$ ./a.out
The addition of a given array is 261
kodingwindow@kw:~$
Dear User, Thank you for visitng Kodingwindow. If you are interested in technical articles, latest technologies, and our journey further, please follow us on LinkedIn.
Dear User, We are grateful for your interest in the Kodingwindow Android app. We intend to soon make it available on the Google Play Store. Currently, Android versions 10 and up require manual apk installations. Would you like to get the app?