write a 'c' program to sum the number of integer values
Answer Posted / durga bhavani
void main()
{
int a[25],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 ? | 39 Yes | 18 No |
Post New Answer View All Answers
What is an identifier?
Is c a great language, or what?
What are register variables? What are the advantage of using register variables?
Write a program to identify if a given binary tree is balanced or not.
How to implement a packet in C
How do you list a file’s date and time?
What is a wrapper function in c?
What could possibly be the problem if a valid function name such as tolower() is being reported by the C compiler as undefined?
hai iam working in sap sd module for one year and working in lumax ind ltd in desp department but my problem is i have done m.b.a in hr/marketing and working sap sd there is any combination it. can you give right solution of my problem. and what can i do?
An organised method of depicting the use of an area of computer memory used to signify the uses for different parts of the memory a) swap b) extended memory c) memory map d) all of the above
what will be maximum number of comparisons when number of elements are given?
What is line in c preprocessor?
What is the difference between new and malloc functions?
How can I call system when parameters (filenames, etc.) Of the executed command arent known until run time?
What are enums in c?