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 about the functions strcat() and strcmp()?
What does printf does?
What is #line?
What is function prototype?
What is #define?
Find duplicates in a file containing 6 digit number (like uid) in O (n) time.
What is a c token and types of c tokens?
What are the types of assignment statements?
Explain what is a program flowchart and explain how does it help in writing a program?
Why is it usually a bad idea to use gets()? Suggest a workaround.
What is #define in c?
Iam a B.Tech graduate and completed my engineering in 2009, from 2005 to 2009 and after that i had done nothing.Now i want to do job and get into BPO field . Friends give me suggestions as what to say in interview... if they ask me that what would you had done ... these many years without doing job ??????? pls urgent
How can I invoke another program (a standalone executable, or an operating system command) from within a c program?
What does c in a circle mean?
Write the syntax and purpose of a switch statement in C.