write a program to find the sum of the array elements in c
language?
Answer Posted / uday
#include<stdio.h>
void main()
{
int a[i],sum=0;
printf("enter n value");
scanf("%d",&n);
for(i=0;i<n,i++)
{
scanf("%d",&a[i])
}
for(i=0;i<n;i++)
{
sum=sum+a[i];
}
printf("sum=%d");
}
Is This Answer Correct ? | 2 Yes | 1 No |
Post New Answer View All Answers
Why ca not I do something like this?
What are the advantages and disadvantages of a heap?
What is the difference between c and python?
Do string constants represent numerical values?
Are enumerations really portable?
what is uses of .net
how to build a exercise findig min number of e heap with list imlemented?
Are there constructors in c?
Explain how do you sort filenames in a directory?
Input is "rama loves rajesh and rajesh Loves rama also and rajesh wear gloves and bloves" To print output is count the numbers of times repeted the word love without case sensitive.
What is omp_num_threads?
Is it possible to have a function as a parameter in another function?
How can you call a function, given its name as a string?
How can I remove the leading spaces from a string?
why return type of main is not necessary in linux