#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


Please Help Members By Posting Answers For Below Questions

What is far pointer in c?

815


There seem to be a few missing operators ..

621


What does sizeof function do?

620


Explain pointers in c programming?

640


Explain what is the benefit of using #define to declare a constant?

614






Why do some versions of toupper act strangely if given an upper-case letter?

636


What is wrong with this program statement? void = 10;

828


What is the modulus operator?

742


What is pointers in c?

663


main() { int i = 10; printf(" %d %d %d ", ++i, i++, ++i); }

640


How reliable are floating-point comparisons?

632


Read the following data in two different files File A: aaaaaaaadddddddd bbbbbbbbeeeeeeee ccccccccffffffff File B: 11111111 22222222 33333333 By using the above files print the following output or write it in the Other file as follows aaaaaaaa11111111dddddddd bbbbbbbb22222222eeeeeeee cccccccc33333333ffffffffffff

2244


What is a static variable in c?

671


What is the benefit of using an enum rather than a #define constant?

665


Device an algorithm for weiler-atherton polygon clipping, where the clipping window can be any specified polygon

5464