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
Explain what is gets() function?
What is static function in c?
Write a program to find factorial of a number using recursive function.
What is the explanation for prototype function in c?
How do I send escape sequences to control a terminal or other device?
What is use of integral promotions in c?
What is unary operator?
What does c mean?
Explain goto?
How to get string length of given string in c?
List some of the dynamic data structures in C?
how to write a c program to print list of fruits in alpabetical order?
Write a C program on Centralized OLTP, Decentralized OLTP using locking mechanism, Semaphore using locking mechanism, Shared memory, message queues, channel of communication, sockets and a simple program on Saving bank application program using OLTP in IPC?
Differentiate call by value and call by reference?
difference between native and cross compilers