#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 far pointer in c?
There seem to be a few missing operators ..
What does sizeof function do?
Explain pointers in c programming?
Explain what is the benefit of using #define to declare a constant?
Why do some versions of toupper act strangely if given an upper-case letter?
What is wrong with this program statement? void = 10;
What is the modulus operator?
What is pointers in c?
main() { int i = 10; printf(" %d %d %d ", ++i, i++, ++i); }
How reliable are floating-point comparisons?
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
What is a static variable in c?
What is the benefit of using an enum rather than a #define constant?
Device an algorithm for weiler-atherton polygon clipping, where the clipping window can be any specified polygon