write a program to find the sum of the array elements in c
language?

Answer Posted / atul lakhera

#include<stdio.h>
#include<conio.h>
void main()
{
int num[10], sum=0;
for(int i=0; i<10; i++)
{
printf("Enter number=");
scanf("%d", &num[i]);
}
printf("Sum of elemets=");
for(i=0; i<10; i++)
{
sum=sum+num[i];
printf("%d", sum);
}
getch();
}

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

hi, which software companys will take,if d candidate's % is jst 55%?

1669


Which of the following operators is incorrect and why? ( >=, <=, <>, ==)

673


Are there namespaces in c?

571


What is typeof in c?

611


List some basic data types in c?

562






What is a pointer in c?

685


What are identifiers and keywords in c?

576


What does & mean in scanf?

606


Explain how can you be sure that a program follows the ansi c standard?

870


There is a practice in coding to keep some code blocks in comment symbols than delete it when debugging. How this affect when debugging?

827


What are qualifiers in c?

577


largest Of three Number using without if condition?

1012


What is meant by initialization and how we initialize a variable?

590


a construct the"else" part of "if" statement contains anoth "if else" statement is called a) if-else b) else-if-else c) if-else-if-else d) chain if/if-else-if

710


What is pass by value in c?

602