write a program to find the sum of the array elements in c
language?
Answer Posted / madhura musale
#include<stdio.h>
#include<conio.h>
void main()
{
int i,a[10],sum;
clrscr();
printf("\n Enter the elements in an array :");
for(i=0;i<10;i++)
scanf("%d",&a[i]);
printf("\n The sum of elements of an array are :");
for((i=0;i<10;i++)
sum=sum+a[i];
printf("\t %d",sum);
getch();
}
Is This Answer Correct ? | 25 Yes | 26 No |
Post New Answer View All Answers
console I/O functions means a) the I/O operations done on disk b) the I/O operations done in all parts c) the input given through keyboard is displayed VDU screen d) none of the above
Can you define which header file to include at compile time?
what is the syallabus of computer science students in group- 1?
What is ambagious result in C? explain with an example.
Can we increase size of array in c?
Write a program, where i have a grid with many cells, how many paths are possible from one point to other desired points.
Explain two-dimensional array.
What are dangling pointers in c?
Find duplicates in a file containing 6 digit number (like uid) in O (n) time.
What is pointers in c with example?
How can I rethow can I return a sequence of random numbers which dont repeat at all?
what is a function method?give example?
The program will first compute the tax you owe based on your income. User is prompted to enter income. Program will compute the total amount of tax owed based on the following: Income Tax 0 - $45,000 = 0.15 x income $45,001 - $90,000 = 6750 + 0.20 x (income – 45000) $90,001 - $140,000 = 15750 + 0.26 x (income – 90000) $140,001 - $200,000 = 28750 + 0.29 x (income – 140000) Greater than $200,000 = 46150 + 0.33 x (income – 200000) Dollar amounts should be in dollars and cents (float point numbers with two decimals shown). Tax is displayed on the screen.
Why pointers are used in c?
c language supports bitwise operations, why a) 'c' language is system oriented b) 'c' language is problem oriented c) 'c' language is middle level language d) all the above