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
Can a function be forced to be inline? Also, give a comparison between inline function and the C macro?
Can you add pointers together? Why would you?
The statement, int(*x[]) () what does in indicate?
Explain modulus operator. What are the restrictions of a modulus operator?
Explain a file operation in C with an example.
What is a example of a variable?
Input is "rama loves rajesh and rajesh Loves rama also and rajesh wear gloves and bloves" To print output is count the numbers of times repeted the word love without case sensitive.
When a c file is executed there are many files that are automatically opened what are they files?
What is the heap?
Is linux written in c?
What are the types of data types and explain?
What is the correct declaration of main?
Is int a keyword in c?
When should you use a type cast?
int i=10; printf("%d %d %d", i, i=20, i);