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
hi, which software companys will take,if d candidate's % is jst 55%?
Which of the following operators is incorrect and why? ( >=, <=, <>, ==)
Are there namespaces in c?
What is typeof in c?
List some basic data types in c?
What is a pointer in c?
What are identifiers and keywords in c?
What does & mean in scanf?
Explain how can you be sure that a program follows the ansi c standard?
There is a practice in coding to keep some code blocks in comment symbols than delete it when debugging. How this affect when debugging?
What are qualifiers in c?
largest Of three Number using without if condition?
What is meant by initialization and how we initialize a variable?
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
What is pass by value in c?