#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
What is the use of f in c?
Where can I get an ansi-compatible lint?
How can you read a directory in a C program?
Why is this loop always executing once?
What is #define size in c?
What is linear search?
PROGRAM TO WRITE CONTENTS OF 1 FILE IN REVERSE TO ANOTHER FILE,PROGRAM TO COPY 1 FILE TO ANOTHER BY SPECIFYING FILE NAMES AS COMMAND LINE
How can I access an I o board directly?
Which node is more powerful and can handle local information processing or graphics processing?
What is c mainly used for?
What are the output(s) for the following ? #include char *f() {char *s=malloc(8); strcpy(s,"goodbye")} main() { char *f(); printf("%c",*f()='A'); }
Can we change the value of static variable in c?
What is a buffer in c?
Write a c program to build a heap method using Pointer to function and pointer to structure ?
Where we use clrscr in c?