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
write a program to generate 1st n fibonacci prime number
 Question Submitted By :: Vasu
I also faced this Question!!     Rank Answer Posted By  
 
  Re: write a program to generate 1st n fibonacci prime number
Answer
# 1
void main()
{
	int x=1,i=0,n;
	printf("Enter the value for n ");
	scanf("%d",&n);
	printf("\n%d ,",i);
	for(;n>=1;--n)
	{
		x=x+i;
		i=x-i;
		printf("%d ,",x);
	}
	getch();
}
 
Is This Answer Correct ?    2 Yes 1 No
Amit Thakur
 

 
 
 
Other C Interview Questions
 
  Question Asked @ Answers
 
write a program in 'c' to find the value of p[i+1]^n.p,i,n are arguments of a macro and n is a integer  1
helllo sir give me some information of the basic information the c as printf ,scanf , %d ,%f and why is the main use of these.  3
What is the difference between typeof(foo) and myFoo.GetType()?  1
what are the languages used in c#? Infosys1
a C prog to swap 2 no.s without using variables just an array? TCS4
Print the foll in C...eg when n=5 the o/p must b + + + + + + + + + + + + + + + + +  1
what is the value of 'i'? i=strlen("Blue")+strlen("People")/strlen("Red")-strlen("green") Cadence4
what is differnence b/w macro & functions  1
how to find turn around time in operating system?  1
to find out the reverse digit of a given number Infosys5
how many times does the loop iterated ? for (i=0;i=10;i+=2) printf("Hi\n"); TCS7
How do we swap or interchange any 2 numbers without using Temporary variable...Anybody can pls answer it.. Thanks in Advance  7
#include<stdio.h> int SumElement(int *,int); void main(void) { int x[10]; int i=10; for(;i;) { i--; *(x+i)=i; } printf("%d",SumElement(x,10)); } int SumElement(int array[],int size) { int i=0; float sum=0; for(;i<size;i++) sum+=array[i]; return sum; } output? Ramco5
Is there any restriction in how many arguments printf or scanf function can take? in which file in my c++ compiler i can see the code for implementation of these two functions??  3
what is call by value and call by reference  2
While(1) { } when this loop get terminate is it a infinite loop?  4
HOW DO YOU HANDLE EXCEPTIONS IN C? AppLabs2
15.what is the disadvantage of using macros? 16.what is the self-referential structure? 17.can a union be self-referenced? 18.What is a pointer? 19.What is the Lvalue and Rvalue? 20.what is the difference between these initializations? 21.Char a[]=”string”; 22.Char *p=”literal”; 23.Does *p++ increment p, or what it points to?  1
main() {int a=200*200/100; printf("%d",a); } TCS7
what is out put of the following code? #include class Base { Base() { cout<<"constructor base"; } ~Base() { cout<<"destructor base"; } } class Derived:public Base { Derived() { cout<<"constructor derived"; } ~Derived() { cout<<"destructor derived"; } } void main() { Base *var=new Derived(); delete var; } Honeywell2
 
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