a) return fib(n) + fin(n-1); b) return fib(n-1) + fin(n-2); c) return fib(n) + fin(n+1); d) return fin(n-1);Code
#include <stdio.h> int fib(n){ if (n <= 2) return 1; else // insert here }
Cprintf is defined to send formatted output to the text window on the screen. And printf directs its output to the stdout. What is the difference between stdout and a text window then? Does the screen serve differently while using cprintf and printf? Please explain
Some questions answers are compiler dependent..So correct it, as in my test I observed the sizeof int is 2 bytes which was in 16bit compiler like turbo. Now world has moved to 32 bits, even 64 bits will coming near soon, so change ur test ans....
Want C program for this please.
I need the code for this... Plz help me out... search C keyword; 1) the program will ask user to enter a file name (a C source file ) 2) software will open file and search C language keywords in file 3) it will print keywords and their count after traversing through whole file in following format; if...
C program using loop and array
Write a C program using arrays and any loop statements that asks the user to enter the number of students. For each student, enter the number of courses. The user should enter the students id number and the marks for each course. Compute and display the total and average of the students marks. sample...
What is the difference between the two statements: file.Write( reinterpret_cast(&pers), sizeof(pers) ); file1.Write( (char*) & pers, sizeof(pers );
Des - data encryption standard
Hi.. Can anyone let me know the data encryption standard(des) code implementation in C language..!!
Reverse a sentence by entering every word by itself
I need help creating an algorithm in Javascript for asking a user to input a sentence, one word at a time in reverse and then at the end the output would be the sentence in its correct form.
Recursive function to compute the number of sequences of n binary digits.
How to write a recursive function to compute the number of sequences of n binary digits that do not contain two 1s in a row. Write a main function to test this function. Input:input consists of the number of binary digits in the sequence.Output:output consists of the number of sequences of given binary...
Reversing array of characters without indexing in the array
How would you reverse a given array of characters and how would you reverse without indexing in the array?
What is pointer linking with operating system?
What does it mean by "host connectivity application"?
Find the factorial of given positive integer.
Consider the following code for finding the factorial of given positive integer IFAct=1 do 100 i=2,n,2 100 IFAct = IFAct*i*(i-1) for which value of n, the above fortran code will not work ? 1. N is even 2. N is odd 3. N is perfect number...
How can I do this using recursion ?
For the list class, add a boolean-valued function that determines whether the data items in the linked list are arranged in ascending order. How can I do this using recursion ?
What is spool templates, how it is counted?
How will you overload subscript operator with more than one dimension?
Matrix manipulation library in C
Let's say you want to develop a matrix manipulation library in pure C (not c++). For example, you want to define a "matrix_multiply" function to get a * b, how to declare the function and how to implement it? Make sure that you consider error handling stuff, e.G., a 2*2 matrix and a 3*3 matrix cannot...
Program listing ip addresses of all active clients.
Write a program which sends a token on network and give the list of ip addresses of all the client currently active ?(program is running on server)
Different ways of expressing the same idea.
Main(){ char s[ ]="man"; int i; for(i=0;s[ I ];i++) printf("n%c%c%c%c",s[ I ],*(s+i),*(i+s),i[s]);} ans:mmmm aaaa nnnn explanation:s[i], *(i+s), *(s+i), i[s] are all different ways of expressing the same idea. Generally array name is the base address for that array. Here s is the base address. I is...