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   interview questions urls   External Links  Contact Us     Login  |  Sign Up                      
Do you have a collection of Interview Questions and interested to share with us!!
Please send that collection to along with your userid / name. ThanQ
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
fn f(x)                   
                                    
{ if(x<=0)
  return;                         
else f(x-1)+x;
}
 Question Submitted By :: Guest
I also faced this Question!!     Rank Answer Posted By  
 
  Re: fn f(x) { if(x<=0) return; else f(x-1)+x; }
Answer
# 1
fn(5) 
i guess
 
Is This Answer Correct ?    0 Yes 0 No
Guest
 
  Re: fn f(x) { if(x<=0) return; else f(x-1)+x; }
Answer
# 2
15
 
Is This Answer Correct ?    0 Yes 0 No
Jai
 
 
 
  Re: fn f(x) { if(x<=0) return; else f(x-1)+x; }
Answer
# 3
f(x-1)+x
 
Is This Answer Correct ?    0 Yes 0 No
Kamal
 

 
 
 
Other C Interview Questions
 
  Question Asked @ Answers
 
what will be the result of the following program ? char *gxxx() { static char xxx[1024]; return xxx; } main() { char *g="string"; strcpy(gxxx(),g); g = gxxx(); strcpy(g,"oldstring"); printf("The string is : %s",gxxx()); } a) The string is : string b) The string is :Oldstring c) Run time error/Core dump d) Syntax error during compilation e) None of these IBM2
How to access or modify the const variable in c ? HP3
There are 3 baskets of fruits with worng lables,one basket has apple,another basket has orange,another has combination of apple and orange,what is the least way of interchange the lables. Google8
How can I read a directory in a C program?  1
How can I convert integers to binary or hexadecimal?  2
Write an implementation of “float stringToFloat(char *str).” The code should be simple, and not require more than the basic operators (if, for, math operators, etc.). • Assumptions • Don’t worry about overflow or underflow • Stop at the 1st invalid character and return the number you have converted till then, if the 1st character is invalid return 0 • Don’t worry about exponential (e.g. 1e10), instead you should treat ‘e’ as an invalid character • Write it like real code, e.g. do error checking • Go though the string only once • Examples • “1.23” should return 1.23 • “1a” should return 1 • “a”should return 0 Qualcomm2
what is the different between if-else and switch statment (other than syntax) CTS9
What is difference between the following 2 lines…. int temp = (int)(0x00); int temp = (0x00int); Bosch3
Design a program using an array that searches a number if it is found on the list of the given input numbers and locate its exact location in the list.  3
what does data structure mean?  7
how does the for loop work actually..suppose for the following program how it ll work plz explain to me for(i=5;i>=0;i--) prinf(i--); RMSI13
write a program to generate 1st n fibonacci prime number  4
can anyone please tell me wat is backlogs... i was looking for the job openings where i read this.. eligibility criteria minimum 70% in degree without backlogs. is that arrear.. if so is it standing arrear or history of arrears... please help me...  2
what is the function of void main()?  4
How do I access command-line arguments? Wipro2
Please list all the unary and binary operators in C.  1
Add 2 64 bit numbers on a 32 bit machine NetApp1
what is the difference between const volatile int i & volatile const int j; HCL1
write a C code to reverse a string using a recursive function, without swapping or using an extra memory. Motorola2
can you explain in brief what is "r+" mode in a file... i know that it si used to read and modify rhe existing content.... but explalanation about the file pointer in "r+" mode i wann to know??????????? Cognizent1
 
For more C Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

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