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
What is the difference between c &c++?
Can a pointer point to null?
What is the translation phases used in c language?
What are the types of operators in c?
What does a function declared as pascal do differently?
The number of measuring units from an arbitarary starting point in a record,area,or control block to some other point a) recording pointer b) offset c) branching d) none
Where is volatile variable stored?
If the size of int data type is two bytes, what is the range of signed int data type?
What are the different properties of variable number of arguments?
What is the role of && operator in a program code?
Explain what are the different data types in c?
what are the different storage classes in c?
what is the syallabus of computer science students in group- 1?
What is the c value paradox and how is it explained?
main() { printf("hello"); fork(); }