#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
main() { inta=10,b=20; a>=5?b=100:b=200; printf("%d ",b); }
What is a protocol in c?
Why C language is a procedural language?
What is the best way to store flag values in a program?
Design a program which assigns values to the array temperature. The program should then display the array with appropriate column and row headings.
What is cohesion and coupling in c?
write a program that will open the file, count the number of occurences of each word in the the complete works of shakespeare. You will then tabulate this information in another file.
What is the advantage of an array over individual variables?
write a c program to find the largest and 2nd largest numbers from the given n numbers without using arrays
How old is c programming language?
What is memory leak in c?
Explain what header files do I need in order to define the standard library functions I use?
What is array of structure in c?
What is new line escape sequence?
Why main function is special give two reasons?