write a program to find the sum of the array elements in c
language?
Answer Posted / atul lakhera
#include<stdio.h>
#include<conio.h>
void main()
{
int num[10], sum=0;
for(int i=0; i<10; i++)
{
printf("Enter number=");
scanf("%d", &num[i]);
}
printf("Sum of elemets=");
for(i=0; i<10; i++)
{
sum=sum+num[i];
printf("%d", sum);
}
getch();
}
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
What is the most efficient way to count the number of bits which are set in an integer?
When is a null pointer used?
Explain what is the difference between text files and binary files?
What is a structure member in c?
Explain why C language is procedural?
c program to compute AREA under integral
how many key words availabel in c a) 28 b) 31 c) 32
What is call by value in c?
What is the use of a ‘ ’ character?
Explain a pre-processor and its advantages.
What are the basic data types associated with c?
How can I determine whether a machines byte order is big-endian or little-endian?
What is %g in c?
What is the difference between union and anonymous union?
Is main is user defined function?