write a 'c' program to sum the number of integer values
Answer Posted / neha shree
void main()
{
int a,n,i,sum=0;
printf("enter n value");
scanf("%d",&n);
printf("\n Enter the numbers");
for(i=0;i<n;i++)
{
scanf("%d",&a[i]);
}
for(i=0;i<n;i++)
sum+=a[i];
printf("\nSum of the given numbers is %d",sum);
}
| Is This Answer Correct ? | 9 Yes | 12 No |
Post New Answer View All Answers
the 'sizeof' operator reported a larger size than the calculated size for a structure type. What could be the reason?
What is difference between arrays and pointers?
Why we use stdio h in c?
What are the advantages and disadvantages of c language?
hi friends how r u as soon in satyam my interview is start but i m very confusued ta wat i do plz help me frndz wat can i do plz tell me some question and answers related with "C" which r asked in the interview .
Explain what are global variables and explain how do you declare them?
An arrangement of information in memory in such a way that it can be easily accessed and processed by a programming language a) string b) data structure c) pointers d) array
application attempts to perform an operation?
I completed my B.tech (IT). Actually I want to develop virtual object that which will change software technology in the future. To develop virtual object what course I have to take. can I any professor to help me.
How can you check to see whether a symbol is defined?
What does sizeof function do?
What is a 'null pointer assignment' error?
What does c mean in basketball?
Is c is a procedural language?
Is main a keyword in c?