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
Write a program to print “hello world” without using semicolon?
PROGRAM TO WRITE CONTENTS OF 1 FILE IN REVERSE TO ANOTHER FILE,PROGRAM TO COPY 1 FILE TO ANOTHER BY SPECIFYING FILE NAMES AS COMMAND LINE
What is the best style for code layout in c?
What is double pointer in c?
what is the syallabus of computer science students in group- 1?
What is header file in c?
write a C program: To recognize date of any format even formats like "feb-02-2003","02-february-2003",mm/dd/yy, dd/mm/yy and display it as mm/dd/yy.
Explain the use of bit fieild.
How can I implement a delay, or time a users response, with sub-second resolution?
An organised method of depicting the use of an area of computer memory used to signify the uses for different parts of the memory a) swap b) extended memory c) memory map d) all of the above
What is a macro, and explain how do you use it?
What is a structure in c language. how to initialise a structure in c?
What are void pointers in c?
program to convert a integer to string in c language'
In a byte, what is the maximum decimal number that you can accommodate?