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                      
tip   To Refer this Site to Your Friends   Click 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
int zap(int n)
  {
    if(n<=1)then zap=1;
    else  zap=zap(n-3)+zap(n-1);
  }
    then the call zap(6) gives the values of zap
    [a] 8  [b]  9  [c] 6  [d]  12  [e] 15
 Question Submitted By :: Guest
I also faced this Question!!     Rank Answer Posted By  
 
  Re: int zap(int n) { if(n<=1)then zap=1; else zap=zap(n-3)+zap(n-1); } then the call zap(6) gives the values of zap [a] 8 [b] 9 [c] 6 [d] 12 [e] 15
Answer
# 1
a
 
Is This Answer Correct ?    1 Yes 0 No
Mannucse
[Kiona]
 
  Re: int zap(int n) { if(n<=1)then zap=1; else zap=zap(n-3)+zap(n-1); } then the call zap(6) gives the values of zap [a] 8 [b] 9 [c] 6 [d] 12 [e] 15
Answer
# 2
ans is 9
 
Is This Answer Correct ?    0 Yes 0 No
Shobha
 
 
 
  Re: int zap(int n) { if(n<=1)then zap=1; else zap=zap(n-3)+zap(n-1); } then the call zap(6) gives the values of zap [a] 8 [b] 9 [c] 6 [d] 12 [e] 15
Answer
# 3
ans: b
 
Is This Answer Correct ?    0 Yes 0 No
Ravinderreddy
 
  Re: int zap(int n) { if(n<=1)then zap=1; else zap=zap(n-3)+zap(n-1); } then the call zap(6) gives the values of zap [a] 8 [b] 9 [c] 6 [d] 12 [e] 15
Answer
# 4
shobha is correct.
 
Is This Answer Correct ?    0 Yes 0 No
Sindhu
 
  Re: int zap(int n) { if(n<=1)then zap=1; else zap=zap(n-3)+zap(n-1); } then the call zap(6) gives the values of zap [a] 8 [b] 9 [c] 6 [d] 12 [e] 15
Answer
# 5
sindhu is correct
 
Is This Answer Correct ?    0 Yes 0 No
Arunthathi
 
  Re: int zap(int n) { if(n<=1)then zap=1; else zap=zap(n-3)+zap(n-1); } then the call zap(6) gives the values of zap [a] 8 [b] 9 [c] 6 [d] 12 [e] 15
Answer
# 6
ans is 9
 
Is This Answer Correct ?    0 Yes 0 No
Tej
 

 
 
 
Other C Interview Questions
 
  Question Asked @ Answers
 
how to implement stack work as a queue?  2
Write a program to print this triangle: * ** * **** * ****** * ******** * ********** Don't use printf statements;use two nested loops instead. you will have to use braces around the body of the outer loop if it contains multiple statements.  1
write a program to find the number of even integers and odd integers in a given array in c language Olive-Tech2
What are the phases in s/w developed life cycle? wat is the diff b/w stack & queue...where do we use stack  5
When you call malloc() to allocate memory for a local pointer, do you have to explicitly free() it?  2
int i; i=2; i++; if(i=4) { printf(i=4); } else { printf(i=3); } output of the program ? Mascot5
What does a run-time "null pointer assignment" error mean?  2
the format specified for hexa decimal is a.%d b.%o c.%x d.%u TCS3
given the piece of code int a[50]; int *pa; pa=a; to access the 6th element of the array which of the following is incorrect? a.*(a+5) b.a[5] c.pa[5] d.*(*pa + 5) TCS4
fun(int x) { if(x > 0) fun(x/2); printf("%d", x); } above function is called as: fun(10); what will it print? } NDS12
what is the difference between declaration ,defenetion and initialization of a variable? LG-Soft4
how to find turn around time in operating system?  1
Look at the Code: #include<string.h> void main() { char s1[]="abcd"; char s2[10]; char s3[]="efgh"; int i; clrscr(); i=strcmp(strcat(s3,ctrcpy(s2,s1))strcat(s3,"abcd")); printf("%d",i); } What will be the output? A)No output B) A Non Integer C)0 D) Garbage Accenture4
what is difference between array and structure? TCS9
what is the use of pointers  4
What are advantages and disadvantages of recursive calling ? HP6
Go through the following code sinippet char a[20]; a="Hello Orcale Test"; will this compile? Oracle2
How can I call a function, given its name as a string? ABC-Telecom1
f1() { f(3);} f(int t) { switch(t); { case 2: c=3; case 3: c=4; case 4: c=5; case 5: c=6; default: c=0;} value of c? Geometric-Software5
Reverse the part of the number which is present from position i to j. Print the new number.[without using the array] eg: num=789876 i=2 j=5 778986  2
 
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