write a program to find the sum of the array elements in c
language?
Answer Posted / rajkumar
//c program of sum array element
#include<stdio.h>
#include<conio.h>
void main()
{
int i,n,sum=0,n,a[100];
clrscr();
printf("How many number are you entering(less than 100) ?");
scanf("%d",&n);
for(i=1;i<=n;i++)
{
scanf("%d",&a[i]);
}
//sum of array element
for(i=1;i<=n;i++)
{
sum=sum+a[i];
}
printf("Sum of your entered number is=%d",sum);
getch();
}//End of main
| Is This Answer Correct ? | 24 Yes | 9 No |
Post New Answer View All Answers
i want to know the procedure of qualcomm for getting a job through offcampus
What is struct node in c?
Which of the following operators is incorrect and why? ( >=, <=, <>, ==)
How many parameters should a function have?
Please send me WIPRO technical question to my mail ID.. its nisha_g28@yahoo.com please its urgent
What is difference between scanf and gets?
Can you explain the four storage classes in C?
What is pragma c?
Devise a program that inputs a 3 digit number n and finds out whether the number is prime or not. Find out its factors.
Which driver is a pure java driver
What do you mean by scope of a variable in c?
What are operators in c?
GIVEN A FLOATING POINT NUMBER HOW IS IT ACTUALLY STORED IN MEMORY ? CAN ANYONE EXPLAIN?? THE 32 BIT REPRESENTATION OF A FLOATING POINT NUMBER ALLOTS: 1 BIT-SIGN 8 BITS-EXPONENT 23 BITS-MANTISSA
Explain modulus operator. What are the restrictions of a modulus operator?
What does the error message "DGROUP exceeds 64K" mean?