UGC NET Computer Science Paper 2 11 Consider the following program
The eduladder is a community of students, teachers and programmers just interested to make you to pass any exams. Because we believe that you can do more than that of just passing exams. What else we do?
Our team
Wondering how this works?
Want to pass exams? or want to help students to pass?

Ask a Question

You are here:-->View note-->View question

UGC NET Computer Science Paper 2 11 Consider the following program

#include  
main() 

    int i, inp; 
    float x, term=1, sum=0; 
    scanf(“%d %f”,&inp, &x); 
    for(i=1;i<=inp;i++) 
    { 
          term=term*x/i; 
          sum=sum+term; 
    } 
    printf(“Result=%f\n”,sum); 

The program computes the sum of which of the following series?
 
(A) x+x2/2+x3/3+x4/4+... 
(B) x+x2/2!+x3/3!+x4/4!+... 
(C) 1+x2/2+x3/3+x4/4+... 
(D) 1+x2/2!+x3/3!+x4/4!+...


By:scribed

Taged users:
|neha|sumesh|Brian|Naveen-Kumar|binojames|OSHO-books|jinsnjjose|metaphor|bhagyaRaj|anushree|vishwadeep|Beingsrt|neenu2|Amitnb|scribed|electron|

Likes:
Be first to like this question

Dislikes:
Be first to dislike this question
Talk about thisDelete|Like|Dislike|


Answers

B

scribed

Likes:
Be first to like this answer

Dislikes:
Be first to dislike this answer
Talk about thisOnce you have earned teacher badge you can edit this questionDelete|Like|Dislike|
------------------------------------

You dont have permission to add an answer herePlease see this

Join us to pass any exams easily