\documentclass{article} \begin{document} \begin{verbatim} 1. What are actual parameters, formal parmaeters, Local Variables. Mark the actual parameters, formal prameters, local variables in the following program. program MyProgram implicit none integer:: myfunction integer:: n1, n2 .... print*, myfunction(n1, n2) end Program Integer function myfunction(m1,m2) integer:: m1, m2 integer:: newvar .... end function myfunction 2. What are intrinsic functions and user-defined functions? What are the uses of functions? 3. What do the following statements do INTEGER FUNCTION MYFUNCTION(NUM1, NUM2, NUM3) INTEGER, INTENT(IN):: NUM1 INTEGER, INTENT(INOUT):: NUM2 INTEGER:: NUM3 ..... END FUNCTION MYFUNCTION 4. Write a function for counting the number of occurences of a particular character in a string. 5. What is recursion. Write a recursive function for finding the factorial of a number 6. Write a function for finding the nth Fibonacci number, where fibonacci number is defined as Fib(0) = 0, Fib(1) = 1 Fib(n) = Fib(n-1) + Fib(n-2). write a recursive function. How many times does the function FIB be called,for n = 5 7. Write a function for finding the GCD of two numbers n1, n2 GCD(n1, n2) = n2, if n1 = 0 = GCD(n2,n1), if n1< n2 = GCD(n1, mod(n2, n1)), otherwise \end{verbatim} \end{document}