TN Online TestSamacheer Kalvi practice

12th Standard Computer Science — Function: Additional Online Practice Test

Share this chapter: Telegram

Pick how many questions you want and set a time limit, then start. You'll get your score at the end with the correct answer and an explanation for every question. Free, in Tamil and English — 15 questions available.

Set up your test

Time remaining00:00
Q1
Which of the following is true about definitions in function specifications?
Q2
What does the type signature x1 -> x2 -> y indicate in function types?
Q3
When writing explicit type annotations for parameters in a function definition, which of the following is mandatory?
Q4
Which keyword must accompany let to define a recursive function?
Q5
Why is the function strlen considered a pure function in programming?
Q6
If a compiler compiles a loop containing several calls to a pure function like strlen(s) where s is not updated, what optimization can a smart compiler perform?
Q7
Which of the following is an example of a side effect that makes a function impure?
Q8
In the Chameleons of Chromeland problem, if the initial numbers of chameleons of types A, B, and C are 4, 4, and 6 respectively, what is the final number of chameleons of the third type after all have been monochromatized?
Q9
Which of the following statements is true regarding function definitions in the context of the textbook?
Q10
In Object-Oriented Programming, how do we refer to the template that specifies the interfaces to enable an object to be created and operated?
Q11
In the recursive definition of the greatest common divisor: let rec gcd a b := if b <> 0 then gcd b (a mod b) else return a, which statement or part handles the termination of the recursion?
Q12
What does the term "wishful thinking" refer to in the strategy of designing programs?
Q13
Consider the following code segment: y := 0 let inc (x: int): int := y := y + x return (y) What is the side effect of calling the inc function?
Q14
Which of the following is true about pure and impure functions regarding their argument modification?
Q15
What happens when a function depends on variables or functions defined outside of its own definition block?

More for this chapter

Book Back Questions10 textbook MCQs · solved Additional MCQs15 extra MCQs · solved Practice TestInteractive · instant score Book Back TestTest yourself on the textbook set Study NotesConcepts & methods Formula SheetAll key formulas

About this Function test

This free online practice test covers Function from the 12th Standard Computer Science (Samacheer Kalvi) syllabus. Choose the number of questions and an optional time limit, then answer and submit — everything is checked in your browser, with the correct answers and a worked explanation shown at the end. For the full solutions to every question in this set, see the solved MCQs page.

More chapters in Computer Science

View all
2 Data Abstraction 3 Scoping 4 Algorithmic Strategies 5 Python -Variables and Operators 6 Control Structures 7 Python functions 8 Strings and String manipulation 9 Lists, Tuples, Sets and Dictionary 10 Python Classes and objects 11 Database Concepts 12 Structured Query Language (SQL) 13 Python and CSV files 14 Importing C++ programs in Python. 15 Data manipulation through SQL 16 Data visualization using pyplot: line chart, pie chart and bar chart