write a program to generate 1st n fibonacci prime number
Answers were Sorted based on User's Feedback
Answer / arun
void main()
{
int x1,x2,x3,n,i;
x1=0;
x2=1;
printf("enter a value for n : ");
scanf("%d",&n);
printf("%d %d ",x1,x2);
for(i=3;i<=n;i++)
{
x3=x1+x2;
printf("%d ",x3);
x1=x2;
x2=x3;
}
}
| Is This Answer Correct ? | 4 Yes | 10 No |
Answer / gayathri
void main()
{
int x1,x2,x3,i;
x1=-1;
x2=1;
printf("enter the value for n :");
scanf("%d",&n);
print
for(i=0;i<n;i++)
{
x3=x1+x2;
if((x3 mod 2)!=0)
{
printf("%d ",x3)
}
x1=x2;
x2=x3;
}
}
| Is This Answer Correct ? | 7 Yes | 15 No |
#include<stdio.h> int main() { int i=2; int j=++i + ++i + i++; printf("%d\n",i); printf("%d\n",j); }
what is use of malloc and calloc?
What is difference between far and near pointers?
#define DCHAR char* typedef char* TCHAR; if using these following variables will be declared like DCHAR ch1, ch2; TCHAR ch3, ch4; then what will be types of ch1, ch2, ch3 and ch4?
process by which one bit patten in to another by bit wise operation is? (a) masking, (b) pruning, (c) biting, (d) chopping,
What is the difference between exit() and _exit()?
Explain what math functions are available for integers? For floating point?
consider the following C code main() { int i=3,x; while(i>0) { x=func(i); i--; } int func(int n) { static sum=0; sum=sum+n; return(sum); } the final value of x is
Ca some one please help me with aC code to allow user enter numbers from 1 to 20 without repeating and prnt the sum of those numbers thnx
give an example of type casting by a simple c program
Can we access RAM? How? Whats the range of access? Similarly What are other hardware we can access?
fn f(x) { if(x<=0) return; else f(x-1)+x; }