#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 / jai
45
| Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
Explain how can I open a file so that other programs can update it at the same time?
What does c mean in standard form?
What's the right way to use errno?
Explain is it valid to address one element beyond the end of an array?
write a C program: To search a file any word which starts with ?a?. If the word following this ?a? starts with a vowel.Then replace this ?a? with ?a? with ?an?. redirect with the output onto an output file.The source file and destination file are specified by the user int the command line.
What does the c in ctime mean?
What is auto keyword in c?
What is #define in c?
a single linked list consists of nodes a to z .print the nodes in reverse order from z to a using recursion
Explain the difference between strcpy() and memcpy() function?
Where are local variables stored in c?
What are categories used for in c?
How variables are declared in c?
write a proram to reverse the string using switch case?
What are volatile variables in c?