write a program to find the sum of the array elements in c
language?
Answer Posted / sayeed khan
#include<stdio.h>
#include<conio.h>
int main()
{
int i,sum=0,a[30],n;
printf("Enter The Number=");
for(i=0;i<n;i++);
scanf("%d",&n);
sum=sum+a[i];
printf("the sum is %d\n",sum);
getch();
return 0;
}
| Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
What is clrscr in c?
Why is it that not all header files are declared in every C program?
What is meant by type specifiers?
Compare interpreters and compilers.
What is the basic structure of c?
Explain the difference between ++u and u++?
Why do we need volatile in c?
what is the format specifier for printing a pointer value?
Explain the difference between strcpy() and memcpy() function?
any C program contains only one function, it must be a) void () b) main () c) message () d) abc ()
What is the difference between #include and #include 'file' ?
What is variable initialization and why is it important?
What is call by value in c?
What are variables c?
Study the following C program :call_me (myvar)int myvar;{ myvar +- 5; }main(){int myvar;myvar = 3;call_me(myvar);printf("%d ",myvar);What will be printed a) 3 b) 5 c) 8 d) symbol