#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 / mannucse
55
| Is This Answer Correct ? | 3 Yes | 2 No |
Post New Answer View All Answers
What is "Duff's Device"?
What is f'n in math?
if a is an integer variable, a=5/2; will return a value a) 2.5 b) 3 c) 2 d) 0
What is a char in c?
What is the right type to use for boolean values in c? Is there a standard type?
What is the value of c?
What's the total generic pointer type?
What is #include stdlib h?
What is pivot in c?
List out few of the applications that make use of Multilinked Structures?
Write the program with at least two functions to solve the following problem. The members of the board of a small university are considering voting for a pay increase for their 10 faculty members. They are considering a pay increase of 8%. Write a program that will prompt for and accept the current salary for each of the faculty members, then calculate and display their individual pay increases. At the end of the program, print the total faculty payroll before and after the pay increase, and the total pay increase involved.
Tell me when is a void pointer used?
What are qualifiers and modifiers c?
code for quick sort?
How do you determine a file’s attributes?