#include<stdio.h>
int SumElement(int *,int);
void main(void)
{
int x[10];
int i=10;
for(;i;)
{
i--;
*(x+i)=i;
}
printf("%d",SumElement(x,10));
}
int SumElement(int array[],int size)
{
int i=0;
float sum=0;
for(;i<size;i++)
sum+=array[i];
return sum;
}
output?
Answer Posted / mannucse
55
| Is This Answer Correct ? | 3 Yes | 2 No |
Post New Answer View All Answers
Explain how does flowchart help in writing a program?
Explain what does a function declared as pascal do differently?
explain how do you use macro?
What does a function declared as pascal do differently?
What is indirection?
Why calloc is better than malloc?
What are the two forms of #include directive?
C language questions for civil engineering
How can I open a file so that other programs can update it at the same time?
What is methods in c?
What is the default value of local and global variables in c?
What are header files and what are its uses in C programming?
Is flag a keyword in c?
What is class and object in c?
What is assert and when would I use it?