PPL Unit 1 and 2 Decode Scan
PPL Unit 1 and 2 Decode Scan
comme tn to
stng
loop
Control
Veriebles
Inslde
the for
Labeled
Continue).
String
Handine
String
and
Loop Breab
ProgrammingLanguage
iabeted
using Java
Stetements
1
Encapsulation
methods
astia
gning Syntax and Semantics
Polymorphism,
Inhertance,
declaring
objects
V constris.
UNIT
fundementals.
returning
& ralue. ructon
MethodsCles
class. methode
to t
Cesses end methods orerloeding
Puh
addtng
rertables
finalire0
method.
nts Inherttarcesthe
reference
colection eccess
objects
kerrord
gerhage returning
rarieble-length
arguments
Language and Software DevelopmentEnvironments
obiect as
perameter.
erquments. Using super. multu
1.1:
pesting ine references.
commend
clas
method
de
clesses super dynamic
tmner
ftware development process.
tnheritence.
orerriding.
and method
package term software
Member
acoess
interfaces
hiererchy
ining is a
Software development process
Pacbages packages,
cles
ebrtract
ciesses
Obiect
protection.
Importng
ding
extending inter
inte
nterface well defined starting and ending points and
access intertaces,
CLASSPATH in Ans. at
each having
end rariebles
pecheges
nesting
appiring). phases, each
tmpiementetior
& specification
creeting Reading
Streams.
Characte Streems Predetined
Fundamental. Applet Architecture, Appler
Output Print Writer ciass.Appiet Apple:
HTML Applet tag. passing parameten
L Sofwaredesign
status window. and specification
Sbeleton. Requesting Repeinting. Program.
to Appiets Difierence
berweer Applet and Application
Implementation
Verification
and validation
Testing
Maintenance
process
Fig.Q.2.1 Phases ofsoftwaredevelopment
(1) Requlrements Analysis and Specification
documented in
identified and
The requirements of the system are
this phase.
a document
which is
requirements are then documented in
nese(learntech2215@gmail.com)
Downloaded by Harshad Pakhale (SRS).
popularly known as Software Requirement Specification
lOMoARcPSD|53449593
Decaratve programming
Fig Q.4.1 Styles of software design
Downloaded by Harshad Pakhale (learntech2215@gmail.com)
lOMoARcPSD|53449593
nd Seman
Programming LanguageSyntaxand
Se.
1-4
PPL
Programmng LanguageSyntaxand
Semantics
Programming
1he focus of this stv PPL 1-5
1)Procedural and functions.
programming language is on
procedures
1.3 Languages and ComputerArchitecture
style is
(2)Functional
Programming: This programming
The expressions.
mainly
ma.
Points to Remember
functions.
and ns Important
applicable for of mathematical
use
architecture in computer is
blocks of this programmin The most commonly used computer
building
functions are the primary
Haskell, ML are
the examples similar to Von Neumann architecture.
Programming languages like of CPU, Memory Unit,
The Von Neumann architecture consists
functionalprogramming
When the abstract data type Input deviceand Outputdevice.
(3)AbstractData Type Programming: CLU Q.5 Explain with diagram
style is used.
the relationship between languages and
variables, functions, procedures and so on. These modules can be Programming languages
primarily usedexport the services from one module to another.
to
Modula-2 and ADA are two commonly used programming Imperative languages
(5)0bject Oriented Programming : The emphasis of this style is Procedural Module Object Generic
Towards
high level
based oriented
objects. Examples are C+, Java, ADA-95 and so on. programming
1-6 ProgrammingLanguageSyntaxand
and SemaN
PPL
Programming LanguageSyntax
andSemantics
used for these lann. 1-7
Neumann languages.
The other termms
languages or
statementbased
u lan anguages PPL
the algorithm of the program
languao3) Simplicity: Due simplicity increases the readability of
to
can
the
also called as state based The simplicity
of these languages is goingto be expressedeasily.
The systematic development
program.
high level of abstraction. constructs that should be
There are some programming
other type oflanguages (4) Safety: is harmful in
Along with the imperativelanguages For example use of gotos
strictly prohibited.
*sustrictly reduce the flexibility and
Languagequalities
Ans.:
More execuion speed
nfax and
ProgrammingLanguageSyntarand SemaPPL ProgrammingLanguageSyntaxand
Semantics
1-8 1-9
PPL used to
the software develo the rules that are
can be combined to
level language along with their. use lexical rule.
Q.8 Enlist any four high
are all keywords in C.
This can be specified using the
purpose. which defined the particular
The syntactical rule has a wider scope
Ans.
defined by the lexical rule.
arrangement of words
Language Originator Year Purpose the context free grammar
For specifying the syntax of a language
COBOL Committee 1960 BusinessData Processing is used.
with the help of suitable
Q.10 Explain the concept of syntax diagrams
Pascal N.Wirth 1971 GeneralPurpose
example.
the lexical rule and syntactic rules
D. Ritchie 1974 System Programming Ans.: Followingexample shows
for a simple program containing a_signment
statements only.
ADA J.Ichbiah 1979 General Purpose,
Embedde syntactic
ynt Rule
System
program> := { <statement>*}
statement> :=<assignment>
<assignment> :=<identifier>=<expr>;
1.6 Language Definition
Kexpr>:=<identifier>| <number> |(<expr>)| <expr> <operator>
<expr>
Importantpointsto Remember Lexical Rule
Every programming language has two major Com
Syntax and Semantics. ntsoperator> :=+|-|°|/|<|>|<=|>=
<identifier> :=<letter> <ld>*
Syntax represents form of a language | <digit>
kld>: <letter>
Semantic representsthe meaningofaDownloaded
language. by Harshad Pakhale (learntech2215@gmail.com)
lOMoARcPSD|53449593
program -0 Begin
End
Thus these two constructs differ only at lexical level
statement concrete syntax specifications incude
Concrete Syntax : The
and keywords that allow parser a to construct aan
the tokens
statementassignment abstract syntax tree unambiguously. The concrete syntax tree will
number
expr
Fig. Q.10.1:Syntax
-0-
diagrams
Q.11 What is abstract syntax and
conerete
suitable examples. syntax ? Abstract syntax Concrete syntax
Ans.
Explain w tree tree
Abstract Syntax:
When the two
lexical level then it is said that constructsdist
theyhave abstractsyntax,
Downloaded by Harshad Pakhale (learntech2215@gmail.com)
lOMoARcPSD|53449593
unguage Syntar.
ntax and Se
Q.12 Explain axiomatic and denotational
example.
emantics with
sema.
Semantics
1-13 Programming Language Syntaxand
Ans.: 1) AxiomaticSemantic PPL
Let,
.The axiomatic semantic is a semantic that is that is appropriatb a = expr
arguing program correctness. semantic will be
assignment statement. Then denotational
be an
An axiomatic semantic consists of specified as
f) error for undefined variable in expr.
i) A language for stating assertionsabout programs. i) dsem (a:
=
expr, =
result
expr, f) =
i)dsem (a:
=
During interpretationof a language, every .Finally the complete program is loaded into the memory as
instructionis
executed. directly executable machine code. This task is carried out by loader.
Translatorscan be compilersand
assemblers
Downloaded by Harshad Pakhale (learntech2215@gmail.com)
lOMoARcPSD|53449593
The compilers
Complier
Ans. descriptor.
Sr. No. The binding can be of two types static binding and dynamic
Interpreter Compiler
1.
binding
Demerit The source Merit: In the process When the attributes are bound at program translation time then it is
program gets interpreted
compilation the prog called static binding.
every time it is to be is
analyzed only once a When the attributes are bound at program execution time then it is
executed, and every time the then the code
source called dynamic binding.
program is
analyzed. generated. Hen
Hence interpretation is
efficient than Ca
less Downloaded by Harshad Pakhale
compiler is efficient th (learntech2215@gmail.com)
lOMoARcPSD|53449593
Programming Lang
I-18
PPL 1-19 ProgrammingLanguageSyntaxand Semantics
PPL 1.81.8 Varlables
In above code, there are three variables namely a,b and c. These
variables have the scope for entire function sum0. Outside the
Remember
Important
Points to function sum), these variables are not visible or accessible.
of memory
memory in which
which
a name
for
reserved
area
som 2) Type
Variable is
be stored.
value can
an
can be modified
modified with
with the hel
help Type can be defined asspecificationof set of values that can be
variable
The values in associatedwith a variable. For example -
assignment statements.
char s;
attributes of variables
Q.20 Explain various Here the variable s is of type character. That means it allows the
Ans. value range from -128 to 127
Various attributes of
variables are The language defines its in-built set of data types. These types are
The scope of the variable is basically the area of instructions For example
nt x
which the variable name is known. The variable is visible under1
name within its scope and is invisible under the name outside Here variable x is a lvalue, because it is an object with an
scope. For example identifiable memory location.
void main()
4) r-value
sum(); The value is encoded value which can be stored in the location
r
}
void sum) associated with the l-value variable. The encoded representationis
interpreted according to the variable's type.
int a,b.c; For example
a=10;b=20; int x
c=a+b;
K=(3+4);
printf"inThe sum= %d",c); The value of (3+4) represents the r-value.
Downloaded by Harshad Pakhale (learntech2215@gmail.com)
lOMoARcPSD|53449593
Syntax and
Language Syntax
and SemeyPPL 1-31 ProgrummingLangnageSymtaxandSemanties
Programming
setuat
varinbles
? parameter
unnnmed
votd main ()
PPL
What are
referenee
mnd
are
those
variables that
hat can
Q.21
variables Such a
unnaned variable.
Declarafon
Am. The
r-value of another
void aum (inta, int b|
accessed
through
called as reference.
be
accessed using pointer to poin sum (10, 20) Call
can
variable
unnamed
The
variable declare a variable of noi.
we can
In pascal the up-arTo void sum (int x, int y)
For exampie rrow
defined by pretixing
type is
integer. The pointer
with the base type. formal parameter
caret symbol (") named type because int 2
a is of Defnitton
/here variable
type a integer /accompanied with type
printi'Addition %d"', z)
and pointed by a
allocate an unnamed integer variable
We can
of type a
Q.23 Explain the positional method of binding.
newlaPtr): //unnamed varnable
for
The languages like C, C+ allow pointer
to rerer o namAns.: Most of the programminglanguages use positional method
binding actual to
variables.For example-
voidmain()
intx=6.//integer named variable formal parameters Actual parameters
nt "ptr. //pointer vanabie in routine call.
ptr=&x //using & the referencevariableis represented. Following Sum (a, b, c) Functlon call
1.9 Routines FigQ.23.1 Binding of
represents formai and actual
parameters
Q.22 What are routines ? Explain how routines can be handled ? positional method
Functdon definiton
Ans.:Routine is a collection of instructionsthat can be use of binding in which oid
sum
(intx, int y, int 2)
perform specific task and can be repeatedly executed. For examp is parameter a is
Functions in C, Assembly language Formal parameters
subprograms,the subroutines bound to parameter
in FORTRAN, Proceduresand x, parameter b is
Functionsin Pascal and Ada.
The routines are usually handled by three ways bound to parameter
i) Declarationii) call y and so on. Fig. Q.23.1 Positional method of binding
Downloaded by Harshad Pakhale (learntech2215@gmail.com)
ii) definition For
lOMoARcPSD|53449593
Programmlng
Language nd Sem
Syntar an
PPL of generic
the
concept which implementsthe
implements
the des 1.10 An Abstract Semantic Process
.24 Explain
routine isa
routine
concept
the concept of
of gen
In C++,
Am.:Generic
data type.
using
general .26 Write short note on abstract semantie processor.
algorithm templates.
outine is
achieved by using above code can be
code can imn
be implemen Ans.: The abstract semantic processori is an abstract processor
C++ the above
In
kor example
follows describing the operational semantics of programming
used for
routine as
using generic
languages.
template <class T>
.It consists of instructionpointer, memory and processor
T add(T a. Tb) The memory is a part where the instruction is executed and data to
be manipulated are stored. The memory is divided into two parts -
TC
Ca+b code memory and data memory. The code memory is denoted by
return c; array C[location_Index] and data memory is denoted by array
jumpt(basedon condition)
Downloaded by Harshad Pakhale (learntech2215@gmail.com)
Fig. Q.25.1
lOMoARcPSD|53449593
Syntar and
1-24
Programming
Language
Semam
polnter PPL 1-25 ProgrammingLanguageSyntaxand Semantics
PPL
Instruction
Memory
instruction
pointer | Hence there are three allocation methods used during run time
The the
to structure. These are
points
always
code
instruction in the 1. Static allocation The static allocation is for all the data objects at
memory. compile time.
Following Fig. Q,26.l
2. Stack allocation In the stack allocation astack is used to manage
machine shows abstract
the run time storage.
machine Code memory Data memon 3. Heap allocation In heap allocation the heap is used to manage
the dynamic memory allocation.
Fig.Q.26.1
Abstract semantic processor 1.12 Case Study: Run Time Structure of C
Language
and Sema
Syntaxand
Programmlng
1-26 code
without ree. PPL 1-17 ProgrammimgLanguageSyntaxand Semanties
forward
PPL straight for abstract
is a straignllocated for abstract semang. Temporary values s.
The temporary variables are needed during
code is a allocated
makes use of a d data in other activation record. This field is aiso cailed static link
For stack allocation technique, C program
record. field.
structure popularlyknown as activation
Activation record. 5. Actual parameters This field holds the information about the
Q.29 Write short note on -
Ans.
actual parameters.These actual parameters are passed to the called
PPL retum 1;
else (n-1)
PL 1-29 Programming LanguageSyntaxand Semantics
factorial
Third call
main)
Downloaded by Harshad Pakhale (learntech2215@gmail.com)
lOMoARcPSD|53449593
1-30 ProgrammingLanguageSyntax
PPL and Sene
{1, 1}; 1-31 Programming LanguageSyntaxand Semantics
inta12 PPL
int b[3 {1, 2, 0} x1,y-0. The x and y values get swapped. But on returning
pali), a[i]); main, the x and y values do not get preserved.
printf"%d, %dn", a[0},a[1); is for printing b[o] and b[2] values. Therefore
The printfstatement
Swapj.a]) we will get 1 2 0.
printf"%d.%d, %dn", bj0], b[1], b[2); Hence output will be
return 0; 1
1 2 0
Ans.: i) Call by value
When Plali], ali] ) is called then
i) Call by reference
formal parameters get associated with
P(1.1) In call by reference, the
actual parameter.
P(x.y) void p(int x, int y)
In the function body P, xand y will be increment. Hence x =
2 "/
i- 2, y 2. But on
x+ 1 x becomes 2, y becomes
=
returning to main, the x and y values will not i+ 1 i= 1/
preserved. y+ 1 y becomes 3 /
printf(" %d %d", a[0], a[1] ) will resultas 11
When control returns to main a[0] = x = y =3 and a[1] remains as
When call to swap (j, a[ji] Dgiven it will be
it is i.e. 1.
swap (x, y) After calling swap function the printf statement is printing b[0],
swap (0, 1) b[1] and b[2] i.e. 1, 2, 0.
In the function body of x Hence output will be,
x X+y 3 1
i.e x 0+1 =1 1 20
yx-y l) Call by value result
y 1-1 =0
xX-Y In call
by value result the actual parameter applied by the caller is
x 1-0 copied into callee's formal parameter the function executes and then
X formal parameter is copied back to caller. No alias or reference is
created between formal and actual parameters.Hence
OECOD Less then
PHOTOcOPY
Downloaded by Harshad Pakhale (learntech2215@gmail.com)
Less than PHOTOCOPY Price
lOMoARcPSD|53449593
2
{
al0] x, a[0] y Structuringof Data,
i.e.
X+ 1
X1+1=2
Computationsand Program
yt 1
i.e. y 1+1 2
2.1 Buitin and PrimitlveTypes
On returningg to main value of x gets copied to
a[0].. afo. al0] ImportantPoints to Remember
The a[l] remains 1. After swap function tne printr prints
d[u}, b[1]a. Any programming language has
b[2). predefined set of built in
data
Hence output will be, types.
2 1 Programminglanguage support various built in data types such as
1 20
boolean, character, integer and reals.
v) Call by name
Q.1
Explain buit in types of programminglanguages.
In this method the actual
parameters will be Ans.: Any programminglanguage has a predefinedset ofbuiltin data
substituted for all tnes
occurrences of formal
parameter. ypes This built in data type reflects the behavior of underiying
Hence hardware.
p( int x, int y) Due to
builtin data type, the values are interpreteddifferently
plalol,a[1D using hardware instructions.
Date, Copetaion
4 reas: The real numbercan be
representedusing
exponent model. In C. the floating Strcurimg Dete.Computatioms&Program
representedusing float data type. point
num The examples of cartesian product constructors in programming
02 What is primitive dats type languages are struetures in C. reeords in Pascal and COBOL
Ans The primitive data pes are elementarydata 0.4 What is finite mapping ? Erplain intensionai and ertensional
types
ESw mapping. .mepping
not buit from some other
types. The values of primitivedata Ans.Finite mapping is
data type a function in which domaintype is mapped
stomic and cannot be decomposedinto simpler to values of range type
constituents
Mary times the built in data types can be The finite mapping is done using two techniques- intensional and
with buit in data type but there are interchangeabh extensional mapping
exceptions. For example .
mCisapimitivedata type which is used to define new constamThe intensional mapping is a routine in which the range type
values are directly associated with domain type values.
22:DataAggregatesand Type Constructors
Finite Mapping
ImportantPolnts to Remember
Programming languages allows the
objects aggregation of elemente
ro
Intensionai Mapping ExtensioraiMapoing
Ing the object certain constructors are provided. T The extensional
resultingobjects are called compound mapping is routine in whicn ra pe a tne
.For example - objects. values are associated as data aggregates. For exampie int a(S].
s
similar date type
elements Constructoris aggregation Here integers from subrange 0 to 4 are mapped althougn tnis
declaration does not specity which element corresponds to the
Q.3 What is Cartesian
constructor? product ? How it is particularsubrange.
useful to denote
Ans.:
D In extensionalmapping using indexing technique the
In extensional elements are
The cartesian u*s
productof n sets A, Aj, For example
AAg As xA, is whose el
Aj, A,
A, denoted
A, denoted mapped in given subrange.
A xA, is
a set
set whose
a
elements
...,
Structuring ons
Data, Coputatlons
&
2.4 ProyN r 2-1 Structurtngof Data,Computations&Program
PPL is Let use define some important terminologies that are associated
abstract data type
Ans.:An
objects with type system
1. A set of data data objecte
on those
abstract
operations 1. Type: The type can be defined as a specific set of values and
2.A set of the data objects and operat
eration particular set of operations that can be applied to such values.
of both
the dat.
3. Encapsulation
3. Er
that user
cannot
manipulate
2. Object or data object: The data object
such a way definecd. can be defined as location in memory with
the use of operations
without assigned name. Refer Fig Q.6.1.
of information hiding, Fig. Q.6.1 Data objectx
facility
Encapsulation
provides the
packages and
in C++,JAVA, Visual i Basi 3. Type error: The illegal operation that manipulate the data
Examples -In ADA
classes facilitate
the abstract
data type. objectsare called type error.
denotes the abstras
ract
in C++ which 4. Type safe or type secure: The operationor a programis said
Following is an example
to be type safe if all the operationsin a program are guaranteed
type to always apply to data of the correct ype. Thus in type safe
class student
operationsno type error will occur.
private Q.7 Differentiate between static and dynamie type checking
int RollNumber,
Ans.
fioatmarks
public: Sr.No. Static Type Checking DynamicType Checking
void input_data();
void display_data(); 1. Staticchecking is a kind of | Dynamic checkingis a kind
checking which is done at of checking which is done
The operations input_data(and display_data)are intended compile time. at run time.
manipulateRolINumberand marks data objects. The data obje For example- In C, C++ the For example - In Perl and
and operationsare 2.
encapsulatedby class. static type checking is Prolog the dynamic type
2.3:Types Systems performed. checking is performed.
Q.6 Explain the concept of 3. The static type checking is The dynamic type checking
type systems.
Ans.: Definition: also called as compile time | is also called as execution
The type system is defined as set of rules use
the languageto structureand time checking.
organizeits collectionof varioustyp | checking.
Type systems play
semanticsof a languagc.
an
important role in determining
Downloaded by Harshad Pakhale (learntech2215@gmail.com)
lOMoARcPSD|53449593
2-6
Computatons
Structuring ofData, &Progre
PPL 2-1 Strueturtngof Data,Camputations&Program
PPL The dynamie
The dynamic type chec. PPL
type checki
detection of
of
For example: Consider a code segment as follows
allows
without brings
brings flexibility typedef struct Node
errors
programming program design.
program
to this
code. Due int x
running the
can be
detected
erors node;
many node 'first, 'second;
and
reliably
quickly, struct Node "last1, "last2,
automaticaly In the above code the variables first and second are name
The checking informati
increases the compile time similarly variables lastl and last2 are name equivalent. But
t need to be kept maintain.equivalent
overhead. and lastl are not name equivalent as the names for these two
during the execution, Th:irst
causes extra Gto Dype expressions are different. Although all the four variabies first
second,last1,last2 are similar under structural equivalencesince they
requirement
duringare representingthe same type pointer('struct Node).
execution of program.
Structural Equivalence
Q8 What ib strongtypesystem? When two expressions are the same basic ype or formed by
that guarantees no
Ans.: The strongtype system is a type system then
to generate type errors. Alanguage wth strongtype system 1S saikapplying the same constructor to structurally equivalent types
are called structurallyequivalent.
to be strongly typed language. A type system is said to be weak ithose expressions
s not strong. Hence a language with weak type system is said t For example:
be weakly typed language. struct student
There are static type system which are the strong type systems{
The static type system is a type system in which type of ever nt i
expression is known at compile time. char name| 10];
Q9 What is type compatibility?
struct employee
Ans.: A strict type system in
which one operand with type A
allowed to perform operation with another hint ID;
operand with type B. 1char name|101:
feature is called type compatibility.
Q.10 Explain name and structural student s1;
Ans.: Name Equivalence
equivalence.
employee e1;
If we write
In the
equivalence the type expressions are given th
name
names. Hence two type then it is said to be valid, because sl and el are structurally
expressions are saidDownloaded
to be name
byequivalen
Harshad Pakhale (learntech2215@gmail.com)
and only if they are identical. sl and el are structurallyequivalent.
quivalent.Thus
lOMoARcPSD|53449593
of
types
two
There are
explicit conversion.
Coercion a.13 Write short note on type structure of C++.
Ans. : The type
structure is divided into two main categories
of C++
- Fundamental types and Derived Types.
Explicitconversion
The fundamentaltype is integer and float. The integer data type
-
Implicit conversion
Two types ofconversion is classified into int, char, short, long. The float data type is
Fig.Q.11.1
automaticallyby the compiler
then classified into float and double
conversion is done conversions are also
If the conversion. The
implicit call The derived type of actually derived from the fundamental types-
is called implicit conversion there
is no loss of inform and pointers
coercions. In this type
of
but not vice versa For example, arrays, class, structure, union, functions
as converted to float
can be
for example integer to float there is no los pointers
conversion from integer
means in from float to i C Typestructure
information but for converting
the information
te
there is a loss.
to be explicit if the programn
The conversion is said Fundamentaltypes Derived ype
one type to another.
specificallywrites something converting
for
conditional statement.
switch case, for, if then program h used to specify the
else, while and so gn
do Downloaded by sucu
Harshad Pakhale (learntech2215@gmail.com)
lOMoARcPSD|53449593
Comyutattons.
2-12
Structuring of Data,
written
&Prog PPL 2-13
Structuringof Data,Computations&Program
PPL
otherwise b this
statement
can be
sing
usi.
i) Procedures
ii) Functions
then a a kind
Procedure is ai of routine that does not return
as
follows- a value. On the
conditional expression
(a>b)?a.b other hand, functions return a value.
written as ides both procedures and functions. The formal
Pascal provid
In ML it is else b
a
Ifa> b then can be-by value or by reference.
parameters
par
Procedure in Pascal
Example of
Procedure
MaxNum (x, y: integer, var z : integer)
Execution and Iteration
2.6:Conditional
begin
if x>ythen
controls.
forms of statement level
Z: X
Q.17 Explaindifferent
controls
forms ofstatementlevel else
-
again.
result integer
begin
if (x > y) then
2.7: Routines
result: =x
else
ImportantPoints to Remember
Routines are collection of statements that are
result:= y:
to be MaxNum: = result;
repeatedly. execute
end
Routines are of two types
Proceduresand Functions 2.8:Style Issues:Side Effects and Allasing
-
2-14
Strucmringof utations& Pro
Data,Comwpntao.
PPL
difficult to read,
understand and modi
dify.
in
Ther 2-15 Structurtngof Data, Computatlons&Program
becomes
might be
modified n
chances that the variables onl
nono Thus assignment to one variable affect the value in another
ariable.
environment.
of error
due to unrestricte
unrestrine.
2) Finding
ermors or
cause
use 2.9: Exceptions
non-locals become complex.
reference ImportantPointsto Remember
passing by
Side effect ofparameter Definition
Definition of
of Exception Excenti
Exception: Exception can be defined as an
the actual parameter
might get modis
There are chances that undesirable condition that occurs in the program.
reference.
passingby' Definition of Exception Handling: Exception handling is
to parameter
Side effect of function : As procedures do not return a value, mechanism by which the language can recognize the unexpected
a
, the
are less side effects of procedures. However, there are seriousSisundesirable and anomalous behavior and specify the response
PPL
3
2-16