Write a C program that computes the value ex by using the
formula
ex =1+x/1!+x2/2!+x3+3!+………….
Answer / dally
#include<stdio.h>
int main()
{
char c = 'X';
int i,n,sum = 0;
printf("Enter values for n\n");
scanf("%d\n",&n);
for(i=0;i<n;i++)
{
sum = sum+power(c,i)/fact(i);
}
fact(int i)
{
int p=1 ,fact;
if(p<=i)
{
fact = p*fact(p++);
}
return fact;
}
| Is This Answer Correct ? | 24 Yes | 43 No |
which type of question asked from c / c++ in interview.
What is the meaning of c in c language?
main() { intj; while9j<=10) { printf("\n%d",j); j=j+1; } }
What is return in c programming?
const char * char * const What is the differnce between the above tow?.
#define MAX 3 main() { printf("MAX = %d ",MAX ); #undef MAX #ifdef MAX printf("Vector Institute”); #endif }
if the address of a[1,1] and a[2,1] are 1000 and 1010 respectively and each occupies 2 bytes then the array has been stored in what order?
4 Answers Amazon, Apple, Bata, Google, NASA,
define c
How can I find out how much memory is available?
What is indirection?
main() { int i = 10; printf(" %d %d %d \n", ++i, i++, ++i); }
Write a c program to print the sizes and ranges of different data types in c?