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
When reallocating memory if any other pointers point into the same piece of memory do you have to readjust these other pointers or do they get readjusted automatically?
What is nested structure in c?
What is ambagious result in C? explain with an example.
If null and 0 are equivalent as null pointer constants, which should I use?
Explain what are preprocessor directives?
Explain what is the general form of a c program?
Are enumerations really portable?
Write a C++ program to generate 10 integer numbers between - 1000 and 1000, then store the summation of the odd positive numbers in variable call it sum_pos, then find the maximum digit in this variable regardless of its digits length.
What are the string functions? List some string functions available in c.
Why c language?
Write a program to produce the following output: 1 2 3 4 5 6 7 8 9 10
What is sizeof array in c?
How do I determine whether a character is numeric, alphabetic, and so on?
Write the program that calculates and prints the average of several integers. Assume that the last value read is sentinel 9999.
Why does everyone say not to use scanf? What should I use instead?