write a program to find the sum of the array elements in c
language?
Answer Posted / uday
#include<stdio.h>
void main()
{
int a[i],sum=0;
printf("enter n value");
scanf("%d",&n);
for(i=0;i<n,i++)
{
scanf("%d",&a[i])
}
for(i=0;i<n;i++)
{
sum=sum+a[i];
}
printf("sum=%d");
}
| Is This Answer Correct ? | 2 Yes | 1 No |
Post New Answer View All Answers
What do you understand by normalization of pointers?
Why c is known as a mother language?
How to create struct variables?
What is the correct code to have following output in c using nested for loop?
Write a program to check palindrome number in c programming?
Is c object oriented?
What are the three constants used in c?
What is data structure in c and its types?
A text file that contains declarations used by a group of functions,programs,or users a) executable file b) header file c) obj file d) .cfile
what is uses of .net
What is the significance of scope resolution operator?
Write a function expand(s1,s2) that expands shorthand notations like a-z in the string s1 into the equivalent complete list abc...xyz in s2 . Allow for letters of either case and digits, and be prepared to handle cases like a-b-c and a-z0-9 and -a-z. z-a:zyx......ba -1-6-:-123456- 1-9-1:123456789987654321 a-R-L:a-R...L a-b-c:abbc
If one class contains another class as a member, in what order are the two class constructors called a) Constructor for the member class is called first b) Constructor for the member class is called second c) Only one of the constructors is called d) all of the above
Which type of language is c?
Should a function contain a return statement if it does not return a value?