Thursday, March 17, 2022

12th Computer Science Chapter 1 Function

12th Computer Science

Chapter 1 Function

 

1. The small sections of code that are used to perform a particular task is called ……………………….






ANSWER A) Subroutines

 

2. Which of the following is a unit of code that is often defined within a greater code structure?





ANSWER (B) Function


3. Which of the following is a distinct syntactic block?
(a) Subroutines
(b) Function
(c) Definition
(d) Modules
Answer:
(c) Definition



3. The variables in a function definition are called as ……………………….
(a) Subroutines
(b) Function
(c) Definition
(d) Parameters
Answer:
(d) Parameters


5. The values which are passed to a function definition are called ……………………….
(a) Arguments
(b) Subroutines
(c) Function
(d) Definition
Answer:
(a) Arguments



6. 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
Answer:
(b) Parentheses


7. Which of the following defines what an object can do?
(a) Operating System
(b) Compiler
(c) Interface
(d) Interpreter
Answer:
(c) Interface


8. Which of the following carries out the instructions defined in the interface?
(a) Operating System
(b) Compiler
(c) Implementation
(d) Interpreter
Answer:
(c) Implementation


9. 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
Answer:
(d) Pure functions


10.The functions which cause side effects to the arguments passed are called ……………………….
(a) Impure functions
(b) Partial Functions
(c) Dynamic Functions
(d) Pure functions
Answer:
(a) Impure functions

No comments:

Post a Comment

12th Computer Science Chapter 1 Function

12th Computer Science Chapter 1 Function   1. The small sections of code that are used to perform a particular task is called ………………………...