#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


Please Help Members By Posting Answers For Below Questions

main() { inta=10,b=20; a>=5?b=100:b=200; printf("%d ",b); }

916


What is a protocol in c?

561


Why C language is a procedural language?

625


What is the best way to store flag values in a program?

583


Design a program which assigns values to the array temperature. The program should then display the array with appropriate column and row headings.

1770






What is cohesion and coupling in c?

596


 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.

1732


What is the advantage of an array over individual variables?

746


write a c program to find the largest and 2nd largest numbers from the given n numbers without using arrays

1788


How old is c programming language?

583


What is memory leak in c?

639


Explain what header files do I need in order to define the standard library functions I use?

650


What is array of structure in c?

604


What is new line escape sequence?

814


Why main function is special give two reasons?

954