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
What are preprocessor directives in c?
Did c have any year 2000 problems?
What is this pointer in c plus plus?
What is hashing in c?
Differentiate fundamental data types and derived data types in C.
A collection of functions,calls,subroutines or other data a) library b) header files c) set of files d) textfiles
Hello. How to write a C program to check and display president party like if i type in the console "biden" and hit enter the output shoud be : "biden is democrat" and if i type "trump" and hit enter the output shoud be: "trump is republican"
Explain how do you sort filenames in a directory?
what are non standard function in c
What is structure data type in c?
Is fortran faster than c?
What is malloc() function?
a) Identify the following declarations. Ex. int i (integer variable) float a[l0](array of 10 real nos) int (*f())() void *f int (*f()) [] void *f int f[] [] [] char *(*f) () int (*f[]) [] float(*f) [] [] float **f int ******f
How to write a multi-statement macro?
Are comments included during the compilation stage and placed in the EXE file as well?