St. Britto Hr. Sec. School - Madurai
12th Computer Science Weekly Test - 1 ( Function )-Aug 2020
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
What is a subroutine?
-
Write an algorithm to check whether the entered number is even or odd.
-
Why strlen is called pure function?
-
-
Write a short note an syntax for function types.
-
Explain the syntax of function definitions.
-
-
Differentiate pure and impure function.
-
write algorthim to check whether the entered number is even or odd.
-
Explain with example Pure and impure functions.
-
What are called Parameters and write a note on
(i) Parameter without Type
(ii) Parameter with Type -
-
Explain with an example interface and implementation.
-
Identify in the following program
let rec gcd a b :=
if b <> 0 then gcd b (a mod b) else return a
i) Name of the function
ii) Identify the statement which tells it is a recursive function
iii) Name of the argument variable
iv) Statement which invoke the function recursively
v) Statement which terminates the recursion
-