Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


Write a c program for sum of first n terms of the series
S = 1 - (1/3) + (1/5) -(1/7) + (1/9) ......

Answers were Sorted based on User's Feedback



Write a c program for sum of first n terms of the series S = 1 - (1/3) + (1/5) -(1/7) + (1/9) ......

Answer / amitabha mukhopadhyay

void main()
{
int i,n,sum;
printf("enter n");
scanf("%d",&n);
for(i=1,i<=n,i++)
{
sum=1;
sum=sum+(-1,i)*1/(2i+1));
printf("sum=%d");
}

Is This Answer Correct ?    2 Yes 0 No

Write a c program for sum of first n terms of the series S = 1 - (1/3) + (1/5) -(1/7) + (1/9) ......

Answer / lavanya

void main()
{
int i,n,sum;
printf("enter n");
scanf("%d",&n);
for(i=1,i<=n,i++)
{
sum=1;
sum=sum+(1%(2i+1));
printf("sum=%d");
}

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More C Interview Questions

What is structure packing in c?

0 Answers  


Does free set pointer to null?

0 Answers  


How can I call system when parameters (filenames, etc.) Of the executed command arent known until run time?

0 Answers  


What is meant by recursion?

0 Answers   ADP,


what does keyword ‘extern’ mean in a function declaration?

1 Answers   Emerson,


how many argument we can pas in in a function

25 Answers   CTS,


How can I insert or delete a line (or record) in the middle of a file?

0 Answers  


Synonymous with pointer array a) character array b) ragged array c) multiple array d) none

0 Answers  


Which is better malloc or calloc?

0 Answers  


#include<stdio.h> void main() { int a=5,b=6,c; int x=(a<b)+7; int y=(x==7)*9; int z=(c=x+y)*2; printf("%h %h %h",x,y,z); } What is the output? Explain it.

8 Answers   IBM,


What is assert and when would I use it?

0 Answers  


What does %f mean c?

1 Answers  


Categories