0% found this document useful (0 votes)
18 views2 pages

Chapter3 - Scoping-12

The document discusses various concepts related to programming scopes, variable mapping, and access control in programming languages. It includes multiple-choice questions, definitions, and explanations regarding local, global, and enclosed scopes, as well as the characteristics and benefits of modular programming. Additionally, it addresses the importance of access control and the use of namespaces in programming.

Uploaded by

sathish
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views2 pages

Chapter3 - Scoping-12

The document discusses various concepts related to programming scopes, variable mapping, and access control in programming languages. It includes multiple-choice questions, definitions, and explanations regarding local, global, and enclosed scopes, as well as the characteristics and benefits of modular programming. Additionally, it addresses the importance of access control and the use of namespaces in programming.

Uploaded by

sathish
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

CHAPTER – 3 – SCOPING

I. BOOK BACK QUESTIONS:


1. Which of the following refers to the visibility of variables in one part of a program to
another part of the same program?
a) Scope b) Memory c) Address d)
Accessibility
2. The process of binding a variable name with an object is called
a) Scope b) Mapping c) late binding d) early
binding
3. Which of the following is used in programming languages to map the variable and object?
a) : : b) : = c) = d) = =
4. Containers for mapping names of variables to objects is called
a) Scope b) Mapping c) Binding d)
Namespaces
5. Which scope refers to the variables defined in current function?
a) Local scope b) Global scope c) Module scope d)Function
Scope
6. The process of subdividing a computer program into separate sub-programs is called
a) Procedural programming b) Modular programming
c) Event Driven programming d) Object oriented programming
7. Which of the following security technique that regulates who can use resources in a
computing environment?
a) Password b) Authentication c) Access control d)
Certification
8. Which of the following members of a class can be handled only from within the class?
a) Public members b) Protected members c) Secured members d) Private
members
9. Which members are accessible from outside the class?
a) Public members b) Protected members c) Secured members d) Private
members
10. The members that are accessible from within the class and are also available to its
subclasses is called
a) Public members b) Protected members c) Secured members d) Private
member
II. PTA
1. A variable which is declared inside a function which contains another function definition. (PTA
- 1)
a) Local b) global c) enclosed d) built in
2. Which are loaded as soon as the library files are imported to the program?(PTA - 3)
a) Built - in scope b) Enclosed scope c) Global scope d) Local
scope
3. Which of the following is not the example of modules? (PTA - 5)
a) procedures b) subroutines c) class d) functions
III. PUBLIC & GOVERNMENT EXAM QUESTIONS:
1. The process of binding a variable name with an object is called (Sep - 20)
a) scope b) Mapping c) late binding d) early
binding
2. Which of the following members of a class can be handled only from within the class? (M – 20)
a) Public members b) protected members c) secured members d) private
members
3. The kind of scope of the variable 'a'used in the Pseudo code given below. (MQP – 19)
Disp ( ):
a:=7
print a Disp ( )
a) local b) global c) Enclosed d) Built – in

I. BOOK BACK QUESTIONS:


1. What is a scope?
2. Why scope should be used for variable. State the reason?
3. What is Mapping?
4. What do you mean by Namespaces?
5. How Python represents the private and protected Access specifiers?
II. PTA:
1. What are modules? (PTA - 4)
III. GOVERNMENT QUESTIONS:
1. What do you mean by Namespaces? (Mar - 20)
2. What are the characteristics of Modules? (Sep - 20)

I. BOOK BACK QUESTIONS:


1. Define Local scope with an example.
2. Define Global scope with an example.
3. Define Enclosed scope with an example.
4. Why access control is required?
5. Identify the scope of the variables in the following pseudo code
and write its Output:

color:= Red mycolor( ):

b:=Blue myfavcolor( )

g:=Green print olor, b, g myfavcolor( )

print color, b

mycolor( )
print color

I. BOOK BACK QUESTIONS:


1. Explain the types of scopes for variable or LEGB rule with example.
2. Write any Five Characteristics of Modules.
3. Write any five benefits in using modular programming.
II. GOVERNMENT QUESTIONS:
1. Explain the types of scopes for variable. (Sep - 20)

You might also like