SlideShare a Scribd company logo
1 of 12
• 1. What are the general subprogram characteristics?
Each subprogram has a single entry point
The calling program unit is suspended during the execution of the
called subprogram,which implies that there is only one subprogram in
execution at any given time
Contol always return to the caller when the subprogram execution
terminates.
• 2. Explain Pass by Reference
• Pass by reference is a second implementation model for inout –mode
parameters.
• Pass by reference method transmits an access path ,usually just an
address to the subprogram.
• This provides the access path to the cell storing the actual parameter .
• Thus the called subprogram is allowed to access the actual parameter
in the calling program unit
• The advantage of Pass by reference is that the passing process itself is
efficient in terms of both time and space
• One of the serious problem of pass by reference is that aliases can be
created .This problem should be expected because pass by reference
make access paths available to the called subprograms
• 3. Define Selection statements ? Which are the different types of
selection statements?
• A selection statement provides the means of choosing between two
or more execution paths in a program.
• Two types of selection statements are:
 Two way selection statements
Multiple –Selection Constructs
• Two –way selection statements
• The general form of two way selector is as follows:
• If control_expression
• Then clause
• Else clause
• The control expressions are specified in parenthesis if the then
reserved word is not used to introduce the then clause
• Clause form: the then and else clauses appears either single
statements or compound statements.
• If (sum==0){
• If(count==0)
• result =0;
• }
• Else
• Result=1;
 multiple –selection constructs
• The multiple –selection construct allows the selection of one of any
number of statements or statement groups.
• Examples of Multiple Selectors
switch (expression){
Case construct_expression_1:statement_1;
…….
Case constant_expression _n:statement_n;
}
• Multiple selection using If
• Consider the following Python selector construct
• If count<10:
Bag1 = True
Elif count<100:
Bag2 = True
Elif count <1000:
Bag 3 =True
• 4 .Define Guarded Commands?
• Guarded commands was suggested by Dijkstra. His primary
motivation was to provide control statements that would support a
program design methodology that ensured correctness during the
development rather than relying on verification or testing of
completed programs to ensure their correctness.
Dijkstra’s has two methods
Dijkstra’s has two methods
Dijkstra’s selection construct and loop structure
Dijkstra’s selection construct has the form
if <Boolean expression > -> <statement>
[] <Boolean expression > -> <statement>
[] ……
[] <Boolean expression > -> <statement>
fi
• The closing reserved word ‘fi’ is the opening reserved word spelled
backward.This form of closing reserved word is taken from ALGOL 68.
• This small blocks called fatbars are used to separate the guarded
clauses and allow clauses to be statement.
• Each line in the selection construct consisting of a Boolean expression
and a statement or statement sequence is called a Guarded command
• The loop structure proposed by Dijkstra has the form
do < Boolean expression > -> <statement>
[] <Boolean expression > -> <statement>
[] ….
[] <Boolean expression > -> <statement>
od
• The semantics of this construct is that all Boolean expressions are
evaluated on each iteration.

More Related Content

Similar to Tutorial PM.pptx

Test-Driven Development
Test-Driven DevelopmentTest-Driven Development
Test-Driven Development
Meilan Ou
 

Similar to Tutorial PM.pptx (20)

08 subprograms
08 subprograms08 subprograms
08 subprograms
 
11 whiteboxtesting
11 whiteboxtesting11 whiteboxtesting
11 whiteboxtesting
 
ACSAC2016: Code Obfuscation Against Symbolic Execution Attacks
ACSAC2016: Code Obfuscation Against Symbolic Execution AttacksACSAC2016: Code Obfuscation Against Symbolic Execution Attacks
ACSAC2016: Code Obfuscation Against Symbolic Execution Attacks
 
Lecture (Software Testing).pptx
Lecture (Software Testing).pptxLecture (Software Testing).pptx
Lecture (Software Testing).pptx
 
Introduction to C ++.pptx
Introduction to C ++.pptxIntroduction to C ++.pptx
Introduction to C ++.pptx
 
Delegetes in c#
Delegetes in c#Delegetes in c#
Delegetes in c#
 
Java Tutorial
Java Tutorial Java Tutorial
Java Tutorial
 
Unit Testng with PHP Unit - A Step by Step Training
Unit Testng with PHP Unit - A Step by Step TrainingUnit Testng with PHP Unit - A Step by Step Training
Unit Testng with PHP Unit - A Step by Step Training
 
SWE-6 TESTING.pptx
SWE-6 TESTING.pptxSWE-6 TESTING.pptx
SWE-6 TESTING.pptx
 
Advanced python
Advanced pythonAdvanced python
Advanced python
 
Elixir
ElixirElixir
Elixir
 
Introduction to c first week slides
Introduction to c first week slidesIntroduction to c first week slides
Introduction to c first week slides
 
Delegates and events
Delegates and events   Delegates and events
Delegates and events
 
Lecture-13.ppt
Lecture-13.pptLecture-13.ppt
Lecture-13.ppt
 
Exception
ExceptionException
Exception
 
Slide 6_Control Structures.pdf
Slide 6_Control Structures.pdfSlide 6_Control Structures.pdf
Slide 6_Control Structures.pdf
 
Test-Driven Development
Test-Driven DevelopmentTest-Driven Development
Test-Driven Development
 
Unit 1.pptx
Unit 1.pptxUnit 1.pptx
Unit 1.pptx
 
ABAP Code Retreat Frankfurt 2016: TDD - Test Driven Development
ABAP Code Retreat Frankfurt 2016: TDD - Test Driven DevelopmentABAP Code Retreat Frankfurt 2016: TDD - Test Driven Development
ABAP Code Retreat Frankfurt 2016: TDD - Test Driven Development
 
ABAPCodeRetreat Frankfurt 2016 - TDD with ABAP
ABAPCodeRetreat Frankfurt 2016 - TDD with ABAPABAPCodeRetreat Frankfurt 2016 - TDD with ABAP
ABAPCodeRetreat Frankfurt 2016 - TDD with ABAP
 

Recently uploaded

Just Call Vip call girls dharamshala Escorts ☎️9352988975 Two shot with one g...
Just Call Vip call girls dharamshala Escorts ☎️9352988975 Two shot with one g...Just Call Vip call girls dharamshala Escorts ☎️9352988975 Two shot with one g...
Just Call Vip call girls dharamshala Escorts ☎️9352988975 Two shot with one g...
gajnagarg
 
Nisha Yadav Escorts Service Ernakulam ❣️ 7014168258 ❣️ High Cost Unlimited Ha...
Nisha Yadav Escorts Service Ernakulam ❣️ 7014168258 ❣️ High Cost Unlimited Ha...Nisha Yadav Escorts Service Ernakulam ❣️ 7014168258 ❣️ High Cost Unlimited Ha...
Nisha Yadav Escorts Service Ernakulam ❣️ 7014168258 ❣️ High Cost Unlimited Ha...
nirzagarg
 
Whitefield Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Ba...
Whitefield Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Ba...Whitefield Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Ba...
Whitefield Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Ba...
amitlee9823
 
Editorial design Magazine design project.pdf
Editorial design Magazine design project.pdfEditorial design Magazine design project.pdf
Editorial design Magazine design project.pdf
tbatkhuu1
 
➥🔝 7737669865 🔝▻ Bokaro Call-girls in Women Seeking Men 🔝Bokaro🔝 Escorts S...
➥🔝 7737669865 🔝▻ Bokaro Call-girls in Women Seeking Men  🔝Bokaro🔝   Escorts S...➥🔝 7737669865 🔝▻ Bokaro Call-girls in Women Seeking Men  🔝Bokaro🔝   Escorts S...
➥🔝 7737669865 🔝▻ Bokaro Call-girls in Women Seeking Men 🔝Bokaro🔝 Escorts S...
amitlee9823
 
Abortion pill for sale in Muscat (+918761049707)) Get Cytotec Cash on deliver...
Abortion pill for sale in Muscat (+918761049707)) Get Cytotec Cash on deliver...Abortion pill for sale in Muscat (+918761049707)) Get Cytotec Cash on deliver...
Abortion pill for sale in Muscat (+918761049707)) Get Cytotec Cash on deliver...
instagramfab782445
 
➥🔝 7737669865 🔝▻ dharamshala Call-girls in Women Seeking Men 🔝dharamshala🔝 ...
➥🔝 7737669865 🔝▻ dharamshala Call-girls in Women Seeking Men  🔝dharamshala🔝  ...➥🔝 7737669865 🔝▻ dharamshala Call-girls in Women Seeking Men  🔝dharamshala🔝  ...
➥🔝 7737669865 🔝▻ dharamshala Call-girls in Women Seeking Men 🔝dharamshala🔝 ...
amitlee9823
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
dollysharma2066
 

Recently uploaded (20)

Pooja 9892124323, Call girls Services and Mumbai Escort Service Near Hotel Hy...
Pooja 9892124323, Call girls Services and Mumbai Escort Service Near Hotel Hy...Pooja 9892124323, Call girls Services and Mumbai Escort Service Near Hotel Hy...
Pooja 9892124323, Call girls Services and Mumbai Escort Service Near Hotel Hy...
 
UI:UX Design and Empowerment Strategies for Underprivileged Transgender Indiv...
UI:UX Design and Empowerment Strategies for Underprivileged Transgender Indiv...UI:UX Design and Empowerment Strategies for Underprivileged Transgender Indiv...
UI:UX Design and Empowerment Strategies for Underprivileged Transgender Indiv...
 
AMBER GRAIN EMBROIDERY | Growing folklore elements | Root-based materials, w...
AMBER GRAIN EMBROIDERY | Growing folklore elements |  Root-based materials, w...AMBER GRAIN EMBROIDERY | Growing folklore elements |  Root-based materials, w...
AMBER GRAIN EMBROIDERY | Growing folklore elements | Root-based materials, w...
 
WhatsApp Chat: 📞 8617697112 Call Girl Baran is experienced
WhatsApp Chat: 📞 8617697112 Call Girl Baran is experiencedWhatsApp Chat: 📞 8617697112 Call Girl Baran is experienced
WhatsApp Chat: 📞 8617697112 Call Girl Baran is experienced
 
💫✅jodhpur 24×7 BEST GENUINE PERSON LOW PRICE CALL GIRL SERVICE FULL SATISFACT...
💫✅jodhpur 24×7 BEST GENUINE PERSON LOW PRICE CALL GIRL SERVICE FULL SATISFACT...💫✅jodhpur 24×7 BEST GENUINE PERSON LOW PRICE CALL GIRL SERVICE FULL SATISFACT...
💫✅jodhpur 24×7 BEST GENUINE PERSON LOW PRICE CALL GIRL SERVICE FULL SATISFACT...
 
Just Call Vip call girls dharamshala Escorts ☎️9352988975 Two shot with one g...
Just Call Vip call girls dharamshala Escorts ☎️9352988975 Two shot with one g...Just Call Vip call girls dharamshala Escorts ☎️9352988975 Two shot with one g...
Just Call Vip call girls dharamshala Escorts ☎️9352988975 Two shot with one g...
 
Nisha Yadav Escorts Service Ernakulam ❣️ 7014168258 ❣️ High Cost Unlimited Ha...
Nisha Yadav Escorts Service Ernakulam ❣️ 7014168258 ❣️ High Cost Unlimited Ha...Nisha Yadav Escorts Service Ernakulam ❣️ 7014168258 ❣️ High Cost Unlimited Ha...
Nisha Yadav Escorts Service Ernakulam ❣️ 7014168258 ❣️ High Cost Unlimited Ha...
 
Whitefield Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Ba...
Whitefield Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Ba...Whitefield Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Ba...
Whitefield Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Ba...
 
Editorial design Magazine design project.pdf
Editorial design Magazine design project.pdfEditorial design Magazine design project.pdf
Editorial design Magazine design project.pdf
 
Hingoli ❤CALL GIRL 8617370543 ❤CALL GIRLS IN Hingoli ESCORT SERVICE❤CALL GIRL
Hingoli ❤CALL GIRL 8617370543 ❤CALL GIRLS IN Hingoli ESCORT SERVICE❤CALL GIRLHingoli ❤CALL GIRL 8617370543 ❤CALL GIRLS IN Hingoli ESCORT SERVICE❤CALL GIRL
Hingoli ❤CALL GIRL 8617370543 ❤CALL GIRLS IN Hingoli ESCORT SERVICE❤CALL GIRL
 
Jordan_Amanda_DMBS202404_PB1_2024-04.pdf
Jordan_Amanda_DMBS202404_PB1_2024-04.pdfJordan_Amanda_DMBS202404_PB1_2024-04.pdf
Jordan_Amanda_DMBS202404_PB1_2024-04.pdf
 
call girls in Vasundhra (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝...
call girls in Vasundhra (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝...call girls in Vasundhra (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝...
call girls in Vasundhra (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝...
 
Call Girls Jalgaon Just Call 8617370543Top Class Call Girl Service Available
Call Girls Jalgaon Just Call 8617370543Top Class Call Girl Service AvailableCall Girls Jalgaon Just Call 8617370543Top Class Call Girl Service Available
Call Girls Jalgaon Just Call 8617370543Top Class Call Girl Service Available
 
➥🔝 7737669865 🔝▻ Bokaro Call-girls in Women Seeking Men 🔝Bokaro🔝 Escorts S...
➥🔝 7737669865 🔝▻ Bokaro Call-girls in Women Seeking Men  🔝Bokaro🔝   Escorts S...➥🔝 7737669865 🔝▻ Bokaro Call-girls in Women Seeking Men  🔝Bokaro🔝   Escorts S...
➥🔝 7737669865 🔝▻ Bokaro Call-girls in Women Seeking Men 🔝Bokaro🔝 Escorts S...
 
Sweety Planet Packaging Design Process Book.pptx
Sweety Planet Packaging Design Process Book.pptxSweety Planet Packaging Design Process Book.pptx
Sweety Planet Packaging Design Process Book.pptx
 
Q4-W4-SCIENCE-5 power point presentation
Q4-W4-SCIENCE-5 power point presentationQ4-W4-SCIENCE-5 power point presentation
Q4-W4-SCIENCE-5 power point presentation
 
Abortion pill for sale in Muscat (+918761049707)) Get Cytotec Cash on deliver...
Abortion pill for sale in Muscat (+918761049707)) Get Cytotec Cash on deliver...Abortion pill for sale in Muscat (+918761049707)) Get Cytotec Cash on deliver...
Abortion pill for sale in Muscat (+918761049707)) Get Cytotec Cash on deliver...
 
➥🔝 7737669865 🔝▻ dharamshala Call-girls in Women Seeking Men 🔝dharamshala🔝 ...
➥🔝 7737669865 🔝▻ dharamshala Call-girls in Women Seeking Men  🔝dharamshala🔝  ...➥🔝 7737669865 🔝▻ dharamshala Call-girls in Women Seeking Men  🔝dharamshala🔝  ...
➥🔝 7737669865 🔝▻ dharamshala Call-girls in Women Seeking Men 🔝dharamshala🔝 ...
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
 

Tutorial PM.pptx

  • 1. • 1. What are the general subprogram characteristics? Each subprogram has a single entry point The calling program unit is suspended during the execution of the called subprogram,which implies that there is only one subprogram in execution at any given time Contol always return to the caller when the subprogram execution terminates.
  • 2. • 2. Explain Pass by Reference • Pass by reference is a second implementation model for inout –mode parameters. • Pass by reference method transmits an access path ,usually just an address to the subprogram. • This provides the access path to the cell storing the actual parameter . • Thus the called subprogram is allowed to access the actual parameter in the calling program unit
  • 3. • The advantage of Pass by reference is that the passing process itself is efficient in terms of both time and space • One of the serious problem of pass by reference is that aliases can be created .This problem should be expected because pass by reference make access paths available to the called subprograms
  • 4. • 3. Define Selection statements ? Which are the different types of selection statements? • A selection statement provides the means of choosing between two or more execution paths in a program. • Two types of selection statements are:  Two way selection statements Multiple –Selection Constructs
  • 5. • Two –way selection statements • The general form of two way selector is as follows: • If control_expression • Then clause • Else clause • The control expressions are specified in parenthesis if the then reserved word is not used to introduce the then clause
  • 6. • Clause form: the then and else clauses appears either single statements or compound statements. • If (sum==0){ • If(count==0) • result =0; • } • Else • Result=1;
  • 7.  multiple –selection constructs • The multiple –selection construct allows the selection of one of any number of statements or statement groups. • Examples of Multiple Selectors switch (expression){ Case construct_expression_1:statement_1; ……. Case constant_expression _n:statement_n; }
  • 8. • Multiple selection using If • Consider the following Python selector construct • If count<10: Bag1 = True Elif count<100: Bag2 = True Elif count <1000: Bag 3 =True
  • 9. • 4 .Define Guarded Commands? • Guarded commands was suggested by Dijkstra. His primary motivation was to provide control statements that would support a program design methodology that ensured correctness during the development rather than relying on verification or testing of completed programs to ensure their correctness. Dijkstra’s has two methods
  • 10. Dijkstra’s has two methods Dijkstra’s selection construct and loop structure Dijkstra’s selection construct has the form if <Boolean expression > -> <statement> [] <Boolean expression > -> <statement> [] …… [] <Boolean expression > -> <statement> fi
  • 11. • The closing reserved word ‘fi’ is the opening reserved word spelled backward.This form of closing reserved word is taken from ALGOL 68. • This small blocks called fatbars are used to separate the guarded clauses and allow clauses to be statement. • Each line in the selection construct consisting of a Boolean expression and a statement or statement sequence is called a Guarded command
  • 12. • The loop structure proposed by Dijkstra has the form do < Boolean expression > -> <statement> [] <Boolean expression > -> <statement> [] …. [] <Boolean expression > -> <statement> od • The semantics of this construct is that all Boolean expressions are evaluated on each iteration.