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 |
what is a NULL Pointer? Whether it is same as an uninitialized pointer?
main() { int i=1; while (i<=5) { printf("%d",i); if (i>2) goto here; i++; } } fun() { here: printf("PP"); }
C language questions for civil engineering
How would you use the functions fseek(), freed(), fwrite() and ftell()?
0 Answers Aspire, Infogain, TISL,
WHO WROTE C LANGUAGE?
This is a variation of the call_me function in the previous question:call_me (myvar)int *myvar;{ *myvar += 5; }The correct way to call this function from main() will be a) call_me(myvar) b) call_me(*myvar) c) call_me(&myvar) d) expanded memory
write a c program to check weather a particluar bit is set or not?
What are the functions to open and close the file in c language?
How do you do dynamic memory allocation in C applications?
Why cd or dvd are round why not square.
Difference between fopen() and open()?
what is the difference between %d and %*d in c languaga?