write a program to find the sum of the array elements in c
language?
Answer Posted / sayeed khan
#include<stdio.h>
#include<conio.h>
int main()
{
int i,sum=0,a[30],n;
printf("Enter The Number=");
for(i=0;i<n;i++);
scanf("%d",&n);
sum=sum+a[i];
printf("the sum is %d\n",sum);
getch();
return 0;
}
| Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
How will you delete a node in DLL?
main(){char *str;scanf("%s",str);printf("%s",str); }The error in the above program is: a) Variable 'str' is not initialised b) Format control for a string is not %s c) Parameter to scanf is passed by value. It should be an address d) none
How can I list all of the predefined identifiers?
What is the purpose of scanf() and printf() functions?
Where static variables are stored in memory in c?
Compare interpreters and compilers.
Why doesnt this code work?
How can I read and write comma-delimited text?
How to get string length of given string in c?
Can a pointer be volatile in c?
Explain how can I avoid the abort, retry, fail messages?
Explain 'far' and 'near' pointers in c.
Is c object oriented?
How can I generate floating-point random numbers?
provide an example of the Group by clause, when would you use this clause