Write a programe print the sum of series 0,1,2,.....10
Answer Posted / manjushree
Answer #2 doesnot count for integer 10.
int main()
{
int i,temp=0;
printf("sum of series is:");
for(i=0;i<10;i++)
temp+=i;
printf("%d",temp);
getch();
}
| Is This Answer Correct ? | 3 Yes | 2 No |
Post New Answer View All Answers
What do you mean by command line argument?
A function can make the value of a variable available to another by a) declaring the variable as global variable b) Passing the variable as a parameter to the second function c) Either of the two methods in (A) and (B) d) binary stream
What is a memory leak? How to avoid it?
Describe how arrays can be passed to a user defined function
What is difference between scanf and gets?
Why clrscr is used after variable declaration?
Why is event driven programming or procedural programming, better within specific scenario?
how can use subset in c program and give more example
What is hungarian notation? Is it worthwhile?
What is file in c language?
Explain what are global variables and explain how do you declare them?
In a switch statement, explain what will happen if a break statement is omitted?
What are header files and explain what are its uses in c programming?
a program that performs some preliminary processing in C, it acts upon certain directives that will affect how the compiler does its work a) compiler b) loader c) directive d) preprocessor
Why is C language being considered a middle level language?