write a 'c' program to sum the number of integer values
Answer Posted / neha shree
void main()
{
int a,n,i,sum=0;
printf("enter n value");
scanf("%d",&n);
printf("\n Enter the numbers");
for(i=0;i<n;i++)
{
scanf("%d",&a[i]);
}
for(i=0;i<n;i++)
sum+=a[i];
printf("\nSum of the given numbers is %d",sum);
}
Is This Answer Correct ? | 9 Yes | 12 No |
Post New Answer View All Answers
Why main function is special give two reasons?
What do you mean by recursion in c?
Stimulate calculator using Switch-case-default statement for two numbers
Explain what is the difference between null and nul?
How is actual parameter different from the formal parameter?
what is diffrence between linear and binary search in array respect to operators?what kind of operator can be used in both seach methods?
How can a program be made to print the line number where an error occurs?
Write a program to generate random numbers in c?
how to print the character with maximum occurence and print that number of occurence too in a string given ?
a value that does not change during program execution a) variabe b) argument c) parameter d) none
What is strcpy() function?
What is formal argument?
How does normalization of huge pointer works?
Explain how do you declare an array that will hold more than 64kb of data?
Which built-in library function can be used to match a patter from the string?