write a program to find the sum of the array elements in c
language?
Answer Posted / vaibhav
#include<stdio.h>
#include<conio.h>
void main()
{
int n[5],sum=0,i=0;
clrscr();
for(i=0;i<4;i++)
{
scanf("%d",&n[i]);
}
for(i=0;i<4;i++)
{
sum=sum+n[i];
}
printf("sum are%d",sum);
getch();
}
Is This Answer Correct ? | 72 Yes | 41 No |
Post New Answer View All Answers
Explain what are linked list?
How can I open files mentioned on the command line, and parse option flags?
What is a ternary operator in c?
find out largest elemant of diagonalmatrix
Difference between Shallow copy and Deep copy?
i got 75% in all semester am i eligible for your company
Is there a way to jump out of a function or functions?
What are the standard predefined macros?
How can I handle floating-point exceptions gracefully?
What is the difference between functions abs() and fabs()?
how could explain about job profile
Explain why c is faster than c++?
What is an lvalue?
if the area was hit by a virus and so the decrease in the population because of death was x/3 and the migration from other places increased a population by 2x then annually it had so many ppl. find our the population in the starting.
What is the difference between memcpy and memmove?