ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
info       Did you received any Funny E-Mails from your Friends and like to share with rest of our friends? Yeah!! you can post that stuff   HERE
Google
 
Categories  >>  Software  >>  Programming Languages  >>  C
 
 


 

 
 C interview questions  C Interview Questions
 C++ interview questions  C++ Interview Questions
 VC++ interview questions  VC++ Interview Questions
 Delphi interview questions  Delphi Interview Questions
 Programming Languages AllOther interview questions  Programming Languages AllOther Interview Questions
Question
Write a C program that computes the value ex by using the 
formula
ex =1+x/1!+x2/2!+x3+3!+………….
 Question Submitted By :: Umayal
I also faced this Question!!     Rank Answer Posted By  
 
  Re: Write a C program that computes the value ex by using the formula ex =1+x/1!+x2/2!+x3+3!+………….
Answer
# 1
#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 ?    2 Yes 2 No
Dally
 

 
 
 
Other C Interview Questions
 
  Question Asked @ Answers
 
Go through the following code sinippet char a[20]; a="Hello Orcale Test"; will this compile? Oracle3
what is difference between array and structure? TCS19
The C language terminator is a.semicolon b.colon c.period d.exclamation mark TCS3
C passes By value or By reference? Geometric-Software5
Study the code: void show() main() { show(); } void show (char *s) { printf("%sn",s); } What will happen if it is compiled & run on an ANSI C Compiler? A)It will compile & nothing will be printed when it is executed B)it will compile but not link C)the compiler will generate an error D)the compiler will generate a warning Accenture4
main() { int x=5; printf("%d %d %d\n",x,x<<2,x>>2); } what is the output? Ramco7
compute the nth mumber in the fibonacci sequence? TCS7
WHAT IS THE DIFFERENCE BETWEEN malloc() and calloc() in c file management?  6
why should i select you? Wipro18
WRITE A PROGRAM TO FIND A REVERSE OF TWO NO  5
how we can make 3d venturing graphics on outer interface Microsoft1
program to find the ASCII value of a number  5
How to Clear last bit if it 1 using Macro TURN_OFF_BIT_LAST Adobe2
we have to use realloc only after malloc or calloc ? or we can use initially with out depending on whether we are using malloc or calloc in our program ?  1
If "AaBbCc" is passed to the char char x(*a) { a[0]?x(a+1):1; printf("%c",a[0]); return 1; } what will be the output? Hughes5
void main() { int i=5; printf("%d",i++ + ++i); } ME11
write a program to generate 1st n fibonacci prime number  5
disadvantages of realloc ? HCL1
what is the hexidecimal number of 4100? Google14
difference between semaphores and mutex?  1
 
For more C Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com