TN Online TestSamacheer Kalvi practice

12th Standard Computer Science — Function: 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 — 25 questions available.

Set up your test

Time remaining00:00
Q1
The small sections of code that are used to perform a particular task is called
Q2
Which of the following is a unit of code that is often defined within a greater code structure?
Q3
Which of the following is a distinct syntactic block?
Q4
The variables in a function definition are called as
Q5
The values which are passed to a function definition are called
Q6
Which of the following are mandatory to write the type annotations in the function definition?
Q7
Which of the following defines what an object can do?
Q8
Which of the following carries out the instructions defined in the interface?
Q9
The functions which will give exact result when same arguments are passed are called
Q10
The functions which cause side effects to the arguments passed are called
Q11
Which of the following is true about definitions in function specifications?
Q12
What does the type signature x1 -> x2 -> y indicate in function types?
Q13
When writing explicit type annotations for parameters in a function definition, which of the following is mandatory?
Q14
Which keyword must accompany let to define a recursive function?
Q15
Why is the function strlen considered a pure function in programming?
Q16
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?
Q17
Which of the following is an example of a side effect that makes a function impure?
Q18
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?
Q19
Which of the following statements is true regarding function definitions in the context of the textbook?
Q20
In Object-Oriented Programming, how do we refer to the template that specifies the interfaces to enable an object to be created and operated?
Q21
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?
Q22
What does the term "wishful thinking" refer to in the strategy of designing programs?
Q23
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?
Q24
Which of the following is true about pure and impure functions regarding their argument modification?
Q25
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 Book Back TestTest yourself on the textbook set Additional MCQ TestTest yourself on the extra 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