Answer Posted / leelanarasimhareddy
void main()
{
int a[20];
printf("enter no of values");
scanf("%d",&n);
for(i=0;i<n;i++)
{
scanf("%d",&a[i]);
}
for(i=0;i<n;i++)
{
sum=sum+a[i];
}
printf("%d",sum);
}
| Is This Answer Correct ? | 63 Yes | 86 No |
Post New Answer View All Answers
What is an operator?
Hi can anyone tell what is a start up code?
Write a program to print fibonacci series without using recursion?
What is the difference between fread buffer() and fwrite buffer()?
What is a macro, and explain how do you use it?
#include main() { int *p, *c, i; i = 5; p = (int*) (malloc(sizeof(i))); printf(" %d",*p); *p = 10; printf(" %d %d",i,*p); c = (int*) calloc(2); printf(" %d ",*c); }
Explain pointer. What are function pointers in C?
What is the auto keyword good for?
Are there any problems with performing mathematical operations on different variable types?
What is the method to save data in stack data structure type?
write a programe to accept any two number and check the following condition using goto state ment.if a>b,print a & find whether it is even or odd and then print.and a
Why do we need functions in c?
Why is struct padding needed?
Can we use any name in place of argv and argc as command line arguments?
what type of questions arrive in interview over c programming?