TN Online TestSamacheer Kalvi practice

12th Standard Computer Science — Scoping: Additional MCQs with Answers & Explanations

Share this chapter: Telegram

15 extra multiple-choice questions for Scoping (12th Standard Computer Science, Samacheer Kalvi), beyond the ones printed in the textbook — each with the correct option highlighted and a clear, worked explanation. Free to read in English and Tamil.

Answer key at a glance

Q1
In programming, what is the term used to describe the container that maps variable names to their corresponding memory objects?
  • A. NamespaceCorrect
  • B. Scope array
  • C. Class module
  • D. Inheritance block
Explanation. Namespaces are containers designed specifically for mapping names of variables to objects, allowing access to memory addresses by the names assigned to them.
Q2
If a variable 'a' is assigned the value 5, 'b' is set equal to 'a', and then 'a' is changed to 3, what value is 'b' mapped to?
  • A. 3
  • B. 5Correct
  • C. 8
  • D. None of the above
Explanation. Since b was bound to the same integer object 5 as a, changing a to 3 only maps a to the new value 3, while b remains mapped to 5.
Q3
The duration for which a mapped variable is alive in a computer program's memory is referred to as its:
  • A. Scope
  • B. Namespace lifetime
  • C. LifetimeCorrect
  • D. Visibility duration
Explanation. The lifetime of a variable is defined as the duration of time for which the variable is alive and remains active in memory.
Q4
Under the LEGB hierarchy, which scope is searched immediately after the Local scope during variable resolution?
  • A. Enclosed ScopeCorrect
  • B. Global Scope
  • C. Built-in Scope
  • D. Module Scope
Explanation. The LEGB rule lists the order of search from highest to lowest hierarchy as Local, Enclosed, Global, and finally Built-in scope.
Q5
Which type of scope occurs when a variable is declared inside an outer function that contains another nested function definition?
  • A. Local Scope
  • B. Enclosed ScopeCorrect
  • C. Global Scope
  • D. Built-in Scope
Explanation. Enclosed scope is created when functions are nested. The inner function can access the variables defined in the outer enclosing function.
Q6
When are the variables and functions of the Built-in scope loaded into a program?
  • A. Only when explicitly called inside a function
  • B. As soon as the compiler or interpreter starts, or when library files are importedCorrect
  • C. After the Local and Global scopes are completely executed
  • D. Upon saving the source code file
Explanation. Built-in scope names are loaded as soon as the compiler/interpreter starts, or whenever associated library files are imported.
Q7
The process of subdividing a large computer program into separate, independent, and reusable sub-programs is known as:
  • A. Scoping
  • B. Access Control
  • C. Modular ProgrammingCorrect
  • D. Variable Mapping
Explanation. Modular programming is the process of subdividing a computer program into separate, independently developed modules or sub-programs.
Q8
Which of the following is a recognized characteristic of modules in programming?
  • A. They cannot contain both data and processing logic
  • B. They can be separately compiled and stored in librariesCorrect
  • C. They can only be called once during a program run
  • D. They must have their scopes declared as public in all environments
Explanation. A key characteristic of modules is that they can be separately compiled, stored in libraries, and integrated into other programs.
Q9
Which of the following benefits of modular programming directly enables multiple programmers to collaborate on the same application simultaneously?
  • A. The code is stored across multiple separate filesCorrect
  • B. Debugging time is automatically reduced to zero
  • C. All variables are automatically placed in Global scope
  • D. The need to write logic in subroutines is completely eliminated
Explanation. Modular programming allows code to be stored across multiple files, making it easier for a team of programmers to collaborate on the same app.
Q10
What is the security technique that regulates who or what is permitted to view or use resources in a computing environment?
  • A. Modularization
  • B. Access ControlCorrect
  • C. Dynamic Scoping
  • D. Local Mapping
Explanation. Access control is a security technique that regulates who or what can view or use resources, minimizing security risks to objects.
Q11
In classical object-oriented programming, the principle of data encapsulation is ensured by combining which of the following?
  • A. Public instance variables and public namespaces
  • B. Private instance variables and public methodsCorrect
  • C. Protected variables and global modules
  • D. Local scopes and nested compilers
Explanation. The arrangement of private instance variables and public methods restricts direct outside access and ensures the principle of data encapsulation.
Q12
Which class members are accessible from within their own class and also available to any of its derived sub-classes, but denied to other processes?
  • A. Private members
  • B. Public members
  • C. Protected membersCorrect
  • D. Global members
Explanation. Protected members are accessible from within their own class and also available to sub-classes, allowing resources to be inherited.
Q13
How does Python handle member access restriction since it does not have strict enforcement mechanisms like C++ or Java?
  • A. By automatically throwing compile-time errors
  • B. By using private namespaces that prevent script compilation
  • C. By prefixing member names with single or double underscores as a conventionCorrect
  • D. By requiring all classes to be written inside Enclosed scopes
Explanation. Python does not strictly restrict access but uses a naming convention of prefixing variables or methods with single or double underscores.
Q14
Which of the following correctly describes the default access behavior of class members in Python compared to C++ or Java?
  • A. In Python, members are private by default; in C++ and Java, they are public
  • B. In Python, members are public by default; in C++ and Java, they are privateCorrect
  • C. In Python, members are protected by default; in C++ and Java, they are local
  • D. There is no default behavior as all environments require explicit keywords
Explanation. All members in a Python class are public by default, whereas by default in C++ and Java all members are private.
Q15
Which of the following prefixing options is prescribed by Python to emulating a private access specifier?
  • A. A single underscore prefix
  • B. A double underscore prefixCorrect
  • C. A double colon prefix
  • D. A double dollar sign prefix
Explanation. Python prescribes prefixing a member's name with double underscores to emulate a private access specifier (and single underscore for protected).
Take the Additional practice test → Open the app

More for this chapter

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

About these Scoping questions

These are the Additional multiple-choice questions for Scoping from the Tamil Nadu State Board (Samacheer Kalvi) 12th Standard Computer Science syllabus. Each question shows the correct option and an original, step-by-step explanation so you understand the method, not just the answer. Use the answer key above to jump to any question, then take the practice test to check yourself under exam-like conditions.

Frequently asked questions

How many MCQs are there in Scoping?

This chapter has 15 book-back multiple-choice questions, each with the correct answer and a step-by-step explanation.

Are these 12th Standard Computer Science MCQs free to practise online?

Yes. Every question, answer and explanation here is free, and you can also take them as a timed practice test.

Where can I find the Scoping book-back answers?

The correct option for each question is highlighted on this page with a worked explanation, plus a quick answer-key summary at the top.

More chapters in Computer Science

View all
1 Function 2 Data Abstraction 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