c programming using pointers

January 13, 2017 | Author: sudha.mtech1504 | Category: N/A
Share Embed Donate


Short Description

this is a collection of c programs using pointers...

Description

EX NO: DATE:

IMPLEMENTATION OF RECURSIVE ALGORITHM USING POINTER

AIM: To write a C-Program to implement a recursive algorithm using pointers ALGORITHM: STEP 1: Start the program STEP 2: Declare the variable, *no, factorial, sum, p, i, and the function fact(int p), sum(int p), fib(int p) STEP 3: Read the value of no. STEP 4: Call the function fact(*no), sum(*no) STEP 5: Using a for loop call the function fib(int p) and display the Fibonacci series & also display factorial & summation. STEP 6: Stop the program FUNCTION FIB (int p) STEP 1: Check whether the value of n is equal to ‘0’ if so return ‘0’ STEP 2: Else check whether (p>=1 && p
View more...

Comments

Copyright ©2017 KUPDF Inc.
SUPPORT KUPDF