write a 'c' program to sum the number of integer values
Answer Posted / chandra
#include<stdio.h>
#include<conio.h>
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 ? | 11 Yes | 5 No |
Post New Answer View All Answers
I heard that you have to include stdio.h before calling printf. Why?
Who developed c language and when?
Where register variables are stored in c?
How do you search data in a data file using random access method?
Write a code to remove duplicates in a string.
What is quick sort in c?
how many types of operators are include in c language a) 4 b) 6 c) 8 d) 12
What is linear search?
By using C language input a date into it and if it is right?
What are # preprocessor operator in c?
what do you mean by enumeration constant?
How do you define CONSTANT in C?
What is a shell structure examples?
Differentiate between null and void pointers.
What is size of union in c?