Function Book Back Questions

12th Standard EM

    Reg.No. :
  •  
  •  
  •  
  •  
  •  
  •  

Computer Science

Time : 01:00:00 Hrs
Total Marks : 50
    5 x 1 = 5
  1. Which of the following are mandatory to write the type annotations in the function definition?

    (a)

    Curly braces

    (b)

    Parentheses

    (c)

    Square brackets

    (d)

    indentations

  2. Which of the following defines what an object can do?

    (a)

    Operating System

    (b)

    Compiler

    (c)

    Interface

    (d)

    Interpreter

  3. Which of the following carries out the instructions defined in the interface?

    (a)

    Operating System

    (b)

    Compiler

    (c)

    Implementation

    (d)

    Interpreter

  4. The functions which will give exact result when same arguments are passed are called

    (a)

    Impure functions

    (b)

    Partial Functions

    (c)

    Dynamic Functions

    (d)

    Pure functions

  5. The functions which cause side effects to the arguments passed are called

    (a)

    impure function

    (b)

    Partial Functions

    (c)

    Dynamic Functions

    (d)

    Pure functions

  6. 5 x 2 = 10
  7. What is a subroutine?

  8. Define Function with respect to Programming language.

  9. Write the inference you get from X:=(78).

  10. Differentiate interface and implementation

  11. Which of the following is a normal function definition and which is recursive function definition
    i) let rec sum x y:
    return x + y
    ii) let disp :
    print ‘welcome’
    iii) let rec sum num:
    if (num!=0) then return num + sum (num-1)
    else
    return num

  12. 5 x 3 = 15
  13. Mention the characteristics of Interface.

  14. Why strlen is called pure function?

  15.  What is the side effect of impure function. Give example.
     

  16. Differentiate pure and impure function.
     

  17. Wha happens if you modify a variable outside the function? Give an example

  18. 4 x 5 = 20
  19. What are called Parameters and write a note on
    (i) Parameter without Type
    (ii) Parameter with Type

  20. 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

  21. Explain with example Pure and impure functions.

  22. Explain with an example interface and implementation.

*****************************************

TN 12th Standard EM Computer Science free Online practice tests

Reviews & Comments about 12th Standard Computer Science Chapter 1 Function Book Back Questions

Write your Comment