write a program to generate 1st n fibonacci prime number
Answer Posted / namrata
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 | 2 No |
Post New Answer View All Answers
Here is a neat trick for checking whether two strings are equal
Write a program to swap two numbers without using third variable in c?
a construct the"else" part of "if" statement contains anoth "if else" statement is called a) if-else b) else-if-else c) if-else-if-else d) chain if/if-else-if
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 build a heap method using Pointer to function and pointer to structure ?
How to write a multi-statement macro?
What do you mean by scope of a variable in c?
What is enumerated data type in c?
When do you not use the keyword 'return' when defining a function a) Always b) Never c) When the function returns void d) dfd
Where static variables are stored in c?
where are auto variables stored? What are the characteristics of an auto variable?
What are pointers in C? Give an example where to illustrate their significance.
Is c high or low level?
What is the best way to comment out a section of code that contains comments?
What is void pointers in c?