12th Standard Syllabus & Materials
12th Standard
TN 12th Computer Applications மின்னணு தரவு பரிமாற்றம் Sample Question Papers Study Material - QB365 Set A
NEW12th Standard
TN 12th Computer Applications மின் - வணிக பாதுகாப்பு அமைப்புகள் Sample Question Papers Study Material - QB365 Set A
NEW12th Standard
TN 12th Computer Applications மின்னணு செலுத்தல் முறைகள் Sample Question Papers Study Material - QB365 Set A
NEW12th Standard
TN 12th Computer Applications மின் - வணிகம் Sample Question Papers Study Material - QB365 Set A
NEW12th Standard
TN 12th Computer Applications திறந்த மூல கருத்துருக்கள் Sample Question Papers Study Material - QB365 Set A
NEW12th Standard
TN 12th Computer Applications வலையமைப்பு வடமிடல் Sample Question Papers Study Material - QB365 Set A

Published on: 27/11/2019
Scoping
Download Tamil Nadu 12th Standard Computer Science question papers, model tests, one-mark questions, important questions, and public exam papers in PDF format. Free study materials and answer keys for TN State Board students.
Questions + Answers key
Take MCQ Computer Science Test

1.
2.
Which of the following keeps track of all these mappings with namespaces?
Programming languages
Application software
System software
MySQL
3.
Which members are accessible from outside the class?
Public members
Protected members
Secured members
Private members
4.
Which of the following security technique that regulates who can use resources in a computing environment?
Password
Authentication
Access control
Certification
5.
The process of binding a variable name with an object is called
Scope
Mapping
late binding
early binding
6.
Write a note on access modifiers of a class.
7.
Write a note on built-in scope.
8.
Identify the scope of the variables in the following pseudo code and write its output
color:= 'Red'
mycolor( ):
b:='Blue'
myfavcolor( ):
g:='Green'
printcolor, b, g
myfavcolor( )
printcolor, b
mycolor( )
print color
9.
10.
Define Local scope with an example.
11.
Explain the concept access control.
12.
Write any five benefits in using modular programming.
13.
Write any Five Characteristics of Modules.
14.
Explain the types of scopes for variable or LEGB rule with example.
15.
What is meant by module?
16.
What is modular programming?
17.
Write the output of the following program
a:=10
Disp():
a:=7
print a
Disp 1():
print a
18.
What are the types of variable scope
19.
Define variable.
1.
(a)
2.
(a)
Programming languages
3.
(a)
Public members
4.
(c)
Access control
5.
(b)
Mapping
6.
(i) Public members (generally methods declared in a class) are accessible from outside the class.
(ii) Protected members of a class are accessible from within the class and are also available to its sub-classes.
(iii) Private members of a class are denied access from outside the class. They can be handled only from within the class.
7.
(i) Built-in scope is the widest scope. The built -in scope has all the names that are pre-loaded into the program scope when we start the compiler or interpreter.
(ii) Any variable or module which is defined in the library functions of a programming language has Built-in or module scope. They are loaded as soon as the library files are imported to the program.

(iii) Normally only Functions or modules come along with the software, as packages, therefore they will come under Built in scope.
8.
Output:
Red, Blue, Green
Red, Blue
Red.
Seope f Variables :

9.
10.
(i) Local scope refers to variables defined in current function. Always, a function will first look up for a variable name in its local scope.
(ii) Only if it does not find it there, the outer scopes are checked.
(iii) Look at this example:
|
1. Disp(): |
Entire program |
Output of the Program 7 |
(iv) On execution of the above code the variable a displays the value 7, because it is defined and available in the local scope.
11.
(i) Access control is a security technique that regulates who or what can view or use resources in a computing environment.
(ii) It is a fundamental concept in security that minimizes risk to the object.
(iii) In other words access control is a selective restriction of access to data. IN Object oriented programming languages it is implemented through access modifiers.
(iv) Classical object-oriented languages, such as C++ and Java. control the access to class members by public, private and protected keywords.
(v) Private members of a class are denied access from the outside the class. They can be handled only from within the class.
(vi) Public members (generally methods declared in a class) are accessible from outside the class. The object of the same class is required to invoke a public method. This arrangement of private instance variables and public methods ensures the principle of data encapsulation.
(vii) Protected members of a class are accessible from within the class and are also available to its sub-classes. No other process is permitted access to it. This enables specific resources of the parent class to be inherited by the child class.
(viii) Python doesn't have any mechanism that effectively restricts access to any instance variable or method. Python prescribes a convention of prefixing the name of the variable or method with single or double underscore to emulate the behaviour of protected and private access specifiers.
(ix) All members in a Python class are public by default. whereas by default in C++ and java they are private. Any member can be accessed from outside the class environment in Python which is not possible in C++ and java.
12.
(i) Less code to be written.
(ii) A single procedure can be developed for reuse, eliminating the need to retype the code many times.
(iii) Programs can be designed more easily because a small teana deals with only a
small part of the entire code.
(iv) Modular programming allowS many programmers to collaborate on the same
application.
(v) The code is stored across multiple files.
(vi) Code is short, sirnple and easy to understand.
(vii) Errors can easily be identified, as they are localized to a subroutine or function.
(viii) The same code can be used in man applications.
(ix) The scoping of variables can easily be controlled.
13.
The following are the desirable characteristics of a module.
(i) Modules contain instructions, processing logic, and data.
(ii) Modules can be separately compiled and stored in a library.
(iii) Modules can be included in a program.
(iv) Module segments can be used by invoking a name and some parameters.
(v) Module segments can be used by other modules.
14.
Types of Variable Scope:
There are 4 types of Variable Scope, let's discuss them one by one:
Local Scope:
(i) Local scope refers to variables defined in current function. Always, a function will first look up for a variable name in its local scope. Only if it does not find it there, the outer scopes are checked.
Look at this example
| 1. Disp(): 2. a:=7 3. print a 4. Disp() |
Entire program |
Output of the Program 7 |
(ii) On execution of the above code the variable a displays the value 7, because it is defined and available in the local scope.
Global Scope:
(i) A variable which is declared outside of all the functions in a program is known as global variable.
(ii) This means, global variable can be accessed inside or outside of all the functions in a program.
Example:
| 1. a:=10 2. Disp(): 3. a:=7 4. print a 5. Disp() 6. print a |
Entire program |
Output of the Program 7 10 |
(iii) On execution of the above code the variable 'a' which is defined inside the function displays the value 7 for the function call Disp() and then it displays 10; because a is defined in global scope.
Enclosed Scope:
(i) All programming languages permit functions to be nested. A function (method) with in another function is called nested function.
(ii) A variable which is declared inside a function which contains another function definition with in it, the inner function can also access the variable of the outer function. This scope is called enclosed scope.
(iii) When a compiler or interpreter search for a variable in a program, it first search Local, and then search Enclosing scopes. Consider
the following example:
| 1. Disp(): 2. a:=10 3. Disp1() 4. print a 5. Disp1() 6. print a 7. Disp() |
Entire Program |
Output of the Program 10 10 |
(iv) In the above example Disp1( ) is defined with in Disp( ). The variable 'a' defined in Disp( ) can be even used by Disp1( ) because it is also a member of Disp( ).
Built-in Scope:
(i) The built-in scope has all the names that are pre-loaded into the program scope when we start the compiler or interpreter.
(ii) Any variable or function which is defined in the modules of a programming language has Built-in or module scope. They are loaded as soon as the library files are imported to the program.Consider the following example.
| Library files associated with the software |
LEGB rule :
The LEGB rule is used to decide the order in which the scopes are to be searched
for scope resolution. The scopes are listed below in terms of hierarchy (highest to
lowest).
.png)
15.
A module is a part of a program. Programs are composed of one or more independently developed modules
16.
The process of subdividing a computer program into separate sub-programs is called modular programming.
17.
The output of the program
7
10
18.
(i) Local scope
(ii) Enclosed scope
(iii) Global scope
(iv) Built-in scope
19.
Variable are addresses (references, or pointers, to an object in memory
12th Standard Syllabus & Materials
12th Standard
TN 12th Computer Applications களப்பெயர் முறைமை (DNS) Sample Question Papers Study Material - QB365 Set A
NEW12th Standard
TN 12th Computer Applications வலையமைப்பு எடுத்துக்காட்டுகள் மற்றும் நெறிமுறைகள் Sample Question Papers Study Material - QB365 Set A
NEW12th Standard
TN 12th Computer Applications கணினி வலையமைப்பு ஓர் அறிமுகம் Sample Question Papers Study Material - QB365 Set A
NEW12th Standard
TN 12th Computer Applications PHP-உடன் MySQL-ஐ இணைத்தல் Sample Question Papers Study Material - QB365 Set A
Tamilnadu Stateboard 12th Standard Subjects

Maths

Chemistry

Physics

Biology

Computer Science

Business Maths and Statistics

Economics

Commerce

Accountancy

History

Computer Applications

Biology

Computer Technology

Computer Applications

Computer Science

Business Maths and Statistics

Commerce

Economics

Maths

Chemistry

Physics

Computer Technology

History

Accountancy

Tamil

English

French
Tamilnadu Stateboard Standards