#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 / lusi dash
55
| Is This Answer Correct ? | 1 Yes | 2 No |
Post New Answer View All Answers
Describe static function with its usage?
How is a null pointer different from a dangling pointer?
can anyone suggest some site name..where i can get some good data structure puzzles???
When was c language developed?
In which layer of the network datastructure format change is done
What language is windows 1.0 written?
How do we open a binary file in Read/Write mode in C?
Is file a keyword in c?
a) Identify the following declarations. Ex. int i (integer variable) float a[l0](array of 10 real nos) int (*f())() void *f int (*f()) [] void *f int f[] [] [] char *(*f) () int (*f[]) [] float(*f) [] [] float **f int ******f
How can I recover the file name given an open stream?
Is it valid to address one element beyond the end of an array?
How many main () function we can have in a project?
What does p mean in physics?
What is fflush() function?
One of the Institutes contains 5 student groups. Every group contains 4 students. Institute wants to store student group’s details in array. Group should contain group member’s details (name and registration number and age), project name, and mark of the group.