Multiple choice

Find the output of the program or error, if any.

#include<stdio.h>

#include<conio.h>

#include<math.h>

int main()

{

int f=1,l,i,x=4,y=4;

float s;

s=x;

for(i=2;i<=y;i+=2)

   {

f=1;

for(l=1;l<=i;l++)

f=f*l;

s=s+pow(x,i)/f;

   }

printf("\\n result is %f" ,s);

getch();

}

  1. 22.3333

  2. 22.666666

  3. 22.999999

  4. 22.3366

  5. Error in the program

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

The correct answer is 22.666666.