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 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 ?    0 Yes 0 No
Amit Thakur
 

 
 
 
Other C Interview Questions
 
  Question Asked @ Answers
 
identify the in correct expression a.a=b=3=4; b.a=b=c=d=0; float a=int b=3.5; d.int a; float b; a=b=3.5; TCS4
write a C program to print the program itself ?! TCS7
what does the following function print? func(int i) { if(i%2)return 0; eale return 1; } main() { int =3; i=func(i); i=func(i); printf("%d",i);} TCS8
who is the founder of c HP7
If 4 digits number is input through the keyboard, Write a program to calculate sum of its 1st & 4th digit.  2
the code is::::: if(condition) printf("hello"); else printf("world"); WHAT WILL BE THE CONDITION IN IF IN SUCH A WAY THAT BOTH HELLO AND WORLD ARE PRINTED IN A SINGLE ATTEMPT?????? SINGLE ATTEMPT IN THE SENSE... IT MUST FIRST PRINT "HELLO" AND IT MUST GO TO ELSE PART AND PRINT "WORLD"..... NO LOOPS, RECURSION ARE ALLOWED........................ IBM7
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
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
The C language terminator is a.semicolon b.colon c.period d.exclamation mark TCS3
to find out the reverse digit of a given number Infosys4
6. Which of the Following is not defined in string.h? A)strspn() B)strerror() C)memchr() D)strod() Accenture1
what is the hexidecimal number of 4100? Google13
program to get the remainder and quotant of given two numbers with out using % and / operators? IBM4
Find Index of least significant bit set in an Integer. ex. int value is say 10001000 results should be 4.  1
write a Program to dispaly upto 100 prime numbers(without using Arrays,Pointer) Wipro5
what is the difference between getch() and getchar()?  2
which types of data structure will i use to convert infix to post fix??? IIT2
how to find turn around time in operating system?  1
What is the output of the program given below #include<stdio.h> main() { char i=0; for(;i>=0;i++) ; printf("%d\n",i); } ADITI11
Write a program to accept a character & display its corrosponding ASCII value & vice versa?  3
 
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