Write a programe print the sum of series 0,1,2,.....10
Answer Posted / athiyaman
#include<stdio.h>
void main()
{
int i,sum=0;
for(i=0;i<=10;i++)
sum=sum+i;
printf("sum=%d",sum);
}
| Is This Answer Correct ? | 6 Yes | 0 No |
Post New Answer View All Answers
Is it better to use a macro or a function?
Why do we use int main instead of void main in c?
What is the advantage of an array over individual variables?
What are the different types of control structures in programming?
What are the valid places to have keyword “break”?
Why do we use pointer to pointer in c?
How can I write data files which can be read on other machines with different word size, byte order, or floating point formats?
What is optimization in c?
main() { printf("hello"); fork(); }
Explain which function in c can be used to append a string to another string?
What is mean by data types in c?
Why do we use static in c?
What is dynamic memory allocation?
Explain high-order bytes.
What is the difference between procedural and declarative language?