Write a C program in Fibonacci series.
Answer / Upendra
Here is a simple solution using recursion.nn```cnint fib(int n) {n if (n <= 1) return n;n else return fib(n-1) + fib(n-2);n}n```
| Is This Answer Correct ? | 0 Yes | 0 No |
what is difference between ANSI structure and C99 Structure?
What is the time and space complexities of merge sort and when is it preferred over quick sort?
Can we include one C program into another C program if yes how?
Why can’t constant values be used to define an array’s initial size?
In C language, a variable name cannot contain?
#include<stdio.h> void main() { int a=5,b=6,c; int x=(a<b)+7; int y=(x==7)*9; int z=(c=x+y)*2; printf("%h %h %h",x,y,z); } What is the output? Explain it.
what is the program to display your name in any color?
printf(), scanf() these are a) library functions b) userdefined functions c) system functions d) they are not functions
What is the function of ceil(X) defined in math.h do? A)It returns the value rounded down to the next lower integer B)it returns the value rounded up to the next higher integer C)the Next Higher Value D)the next lower value
What is the symbol indicated the c-preprocessor?
What is the use of the #include directive?
What is the significance of c program algorithms?