SlideShare uma empresa Scribd logo
1 de 2
Chapter 7 review questions:

   1. Define operator precedence and operator associativity?

Precedence: defines order and priority of the operator evaluation from
different precedence levels.

Associativity: defines the order of operators evaluation when it is form
the same precedence level.

   2. Define functional side effects.

When the function changes either one of its parameters or a global
variable.

   3. What is coercion?

Is an implicit type conversion that is initiated by the compiler?

   4. What is conditional expression?

Evaluate one of the expression's conditions after Boolean control
statement is evaluated.

   5. What is an overloaded operator?

Is an operator with multiple uses.

   6. Define narrowing and widening conversions.

A narrowing conversion is converting value to type cannot store even
approximation of all of the original type.

A widening conversion is converting value to type that can include at
least approximation of all of values of original type.

   7. What is a mixed-mode expression?

When the operator can take operands of different types.
8. How does operand evaluation order interact with functional side
      effects?

If the language does not allow functional side effects then the order of
evaluating the operands has no effects on the value of the expression.

   9. What is short-circuit evaluation?

Result is determined without evaluating all of the operands and/or
operators.

   10.Name a language that always does short-circuit evaluation of
      Boolean expression. Name one that never does it. Name one
      which the programmer is allowed to choose.

JavaScript always does short-circuit evaluation and Ada allow the
programmer to choose.

   11.How does C support relational and Boolean expressions?

By using numeric types to express the Boolean value 0 for false and 1 for
true.

   12.What is the purpose of a compound assignment operator?

A compound assignment operator is a short hand method of specifying a
commonly needed form of assignment.

   13.What is the associativity of C's unary arithmetic operators?

Associativity is to the right.

   14.What is one possible disadvantage of treating the assignment
      operator as if it were an arithmetic operator?

It provide yet another side effect.

   15.What mixed-mode assignment are allowed in Ada?

Ada does not allow mixed-mode assignment.

   16.What mixed-mode assignment are allowed in Java?

   It allow mixed-mode assignment only if the required coercion is
   widening.

Mais conteúdo relacionado

Mais procurados

Classification of Compilers
Classification of CompilersClassification of Compilers
Classification of CompilersSarmad Ali
 
Software Engineering - chp8- deployment
Software Engineering - chp8- deploymentSoftware Engineering - chp8- deployment
Software Engineering - chp8- deploymentLilia Sfaxi
 
Chapter 9 & chapter 10 solutions
Chapter 9 & chapter 10 solutionsChapter 9 & chapter 10 solutions
Chapter 9 & chapter 10 solutionsSaeed Iqbal
 
White box black box & gray box testing
White box black box & gray box testingWhite box black box & gray box testing
White box black box & gray box testingHimanshu
 
Software development life cycle (SDLC)
Software development life cycle (SDLC)Software development life cycle (SDLC)
Software development life cycle (SDLC)Simran Kaur
 
Debuggers in system software
Debuggers in system softwareDebuggers in system software
Debuggers in system softwaregayathri ravi
 
Software testing & Quality Assurance
Software testing & Quality Assurance Software testing & Quality Assurance
Software testing & Quality Assurance Webtech Learning
 
Software engineering critical systems
Software engineering   critical systemsSoftware engineering   critical systems
Software engineering critical systemsDr. Loganathan R
 
White Box Testing And Control Flow & Loop Testing
White Box Testing And Control Flow & Loop TestingWhite Box Testing And Control Flow & Loop Testing
White Box Testing And Control Flow & Loop TestingAnkit Mulani
 
Need for Software Engineering
Need for Software EngineeringNeed for Software Engineering
Need for Software EngineeringUpekha Vandebona
 
Compiler question bank
Compiler question bankCompiler question bank
Compiler question bankArthyR3
 
SRS(software requirement specification)
SRS(software requirement specification)SRS(software requirement specification)
SRS(software requirement specification)Akash Kumar Dhameja
 
Alpha-beta pruning (Artificial Intelligence)
Alpha-beta pruning (Artificial Intelligence)Alpha-beta pruning (Artificial Intelligence)
Alpha-beta pruning (Artificial Intelligence)Falak Chaudry
 
Techniques & applications of Compiler
Techniques & applications of CompilerTechniques & applications of Compiler
Techniques & applications of CompilerPreethi AKNR
 
S.D.L.C (Software Development Life Cycle.)
S.D.L.C (Software Development Life Cycle.)S.D.L.C (Software Development Life Cycle.)
S.D.L.C (Software Development Life Cycle.)Jayesh Buwa
 
RAD MODEL.pptx
RAD MODEL.pptxRAD MODEL.pptx
RAD MODEL.pptxsuchita74
 

Mais procurados (20)

Classification of Compilers
Classification of CompilersClassification of Compilers
Classification of Compilers
 
Software Engineering - chp8- deployment
Software Engineering - chp8- deploymentSoftware Engineering - chp8- deployment
Software Engineering - chp8- deployment
 
Chapter 9 & chapter 10 solutions
Chapter 9 & chapter 10 solutionsChapter 9 & chapter 10 solutions
Chapter 9 & chapter 10 solutions
 
Interactive debugging system
Interactive debugging systemInteractive debugging system
Interactive debugging system
 
White box black box & gray box testing
White box black box & gray box testingWhite box black box & gray box testing
White box black box & gray box testing
 
Process Models IN software Engineering
Process Models IN software EngineeringProcess Models IN software Engineering
Process Models IN software Engineering
 
Software development life cycle (SDLC)
Software development life cycle (SDLC)Software development life cycle (SDLC)
Software development life cycle (SDLC)
 
Debuggers in system software
Debuggers in system softwareDebuggers in system software
Debuggers in system software
 
Software testing & Quality Assurance
Software testing & Quality Assurance Software testing & Quality Assurance
Software testing & Quality Assurance
 
Software engineering critical systems
Software engineering   critical systemsSoftware engineering   critical systems
Software engineering critical systems
 
White Box Testing And Control Flow & Loop Testing
White Box Testing And Control Flow & Loop TestingWhite Box Testing And Control Flow & Loop Testing
White Box Testing And Control Flow & Loop Testing
 
Need for Software Engineering
Need for Software EngineeringNeed for Software Engineering
Need for Software Engineering
 
Lex
LexLex
Lex
 
Compiler question bank
Compiler question bankCompiler question bank
Compiler question bank
 
SRS(software requirement specification)
SRS(software requirement specification)SRS(software requirement specification)
SRS(software requirement specification)
 
The structure of agents
The structure of agentsThe structure of agents
The structure of agents
 
Alpha-beta pruning (Artificial Intelligence)
Alpha-beta pruning (Artificial Intelligence)Alpha-beta pruning (Artificial Intelligence)
Alpha-beta pruning (Artificial Intelligence)
 
Techniques & applications of Compiler
Techniques & applications of CompilerTechniques & applications of Compiler
Techniques & applications of Compiler
 
S.D.L.C (Software Development Life Cycle.)
S.D.L.C (Software Development Life Cycle.)S.D.L.C (Software Development Life Cycle.)
S.D.L.C (Software Development Life Cycle.)
 
RAD MODEL.pptx
RAD MODEL.pptxRAD MODEL.pptx
RAD MODEL.pptx
 

Semelhante a Chapter 7 review questions

Technical_Interview_Questions.pdf
Technical_Interview_Questions.pdfTechnical_Interview_Questions.pdf
Technical_Interview_Questions.pdfadityashukla939020
 
Tcs NQTExam technical questions
Tcs NQTExam technical questionsTcs NQTExam technical questions
Tcs NQTExam technical questionsAniketBhandare2
 
Object-Oriented Programming with Java UNIT 1
Object-Oriented Programming with Java UNIT 1Object-Oriented Programming with Java UNIT 1
Object-Oriented Programming with Java UNIT 1SURBHI SAROHA
 
2013 bookmatter learn_javaforandroiddevelopment
2013 bookmatter learn_javaforandroiddevelopment2013 bookmatter learn_javaforandroiddevelopment
2013 bookmatter learn_javaforandroiddevelopmentCarlosPineda729332
 
Introduction to functional programming
Introduction to functional programmingIntroduction to functional programming
Introduction to functional programmingThang Mai
 
Ap Power Point Chpt3
Ap Power Point Chpt3Ap Power Point Chpt3
Ap Power Point Chpt3dplunkett
 
GUI Programming in JAVA (Using Netbeans) - A Review
GUI Programming in JAVA (Using Netbeans) -  A ReviewGUI Programming in JAVA (Using Netbeans) -  A Review
GUI Programming in JAVA (Using Netbeans) - A ReviewFernando Torres
 
20 most important java programming interview questions
20 most important java programming interview questions20 most important java programming interview questions
20 most important java programming interview questionsGradeup
 
Introduction To Programming with Python Lecture 2
Introduction To Programming with Python Lecture 2Introduction To Programming with Python Lecture 2
Introduction To Programming with Python Lecture 2Syed Farjad Zia Zaidi
 
OCA Java SE 8 Exam Chapter 2 Operators & Statements
OCA Java SE 8 Exam Chapter 2 Operators & StatementsOCA Java SE 8 Exam Chapter 2 Operators & Statements
OCA Java SE 8 Exam Chapter 2 Operators & Statementsİbrahim Kürce
 
Designing function families and bundles with java's behaviors parameterisatio...
Designing function families and bundles with java's behaviors parameterisatio...Designing function families and bundles with java's behaviors parameterisatio...
Designing function families and bundles with java's behaviors parameterisatio...Alain Lompo
 
JAVA VIVA QUESTIONS_CODERS LODGE.pdf
JAVA VIVA QUESTIONS_CODERS LODGE.pdfJAVA VIVA QUESTIONS_CODERS LODGE.pdf
JAVA VIVA QUESTIONS_CODERS LODGE.pdfnofakeNews
 
Why functional programming in C# & F#
Why functional programming in C# & F#Why functional programming in C# & F#
Why functional programming in C# & F#Riccardo Terrell
 
lazy evaluation
lazy evaluationlazy evaluation
lazy evaluationRajendran
 

Semelhante a Chapter 7 review questions (20)

Technical_Interview_Questions.pdf
Technical_Interview_Questions.pdfTechnical_Interview_Questions.pdf
Technical_Interview_Questions.pdf
 
Chapter 07
Chapter 07 Chapter 07
Chapter 07
 
slides03.ppt
slides03.pptslides03.ppt
slides03.ppt
 
Tcs NQTExam technical questions
Tcs NQTExam technical questionsTcs NQTExam technical questions
Tcs NQTExam technical questions
 
Object-Oriented Programming with Java UNIT 1
Object-Oriented Programming with Java UNIT 1Object-Oriented Programming with Java UNIT 1
Object-Oriented Programming with Java UNIT 1
 
2013 bookmatter learn_javaforandroiddevelopment
2013 bookmatter learn_javaforandroiddevelopment2013 bookmatter learn_javaforandroiddevelopment
2013 bookmatter learn_javaforandroiddevelopment
 
Introduction to functional programming
Introduction to functional programmingIntroduction to functional programming
Introduction to functional programming
 
Solid Principles
Solid PrinciplesSolid Principles
Solid Principles
 
Training 8051Report
Training 8051ReportTraining 8051Report
Training 8051Report
 
Ap Power Point Chpt3
Ap Power Point Chpt3Ap Power Point Chpt3
Ap Power Point Chpt3
 
GUI Programming in JAVA (Using Netbeans) - A Review
GUI Programming in JAVA (Using Netbeans) -  A ReviewGUI Programming in JAVA (Using Netbeans) -  A Review
GUI Programming in JAVA (Using Netbeans) - A Review
 
20 most important java programming interview questions
20 most important java programming interview questions20 most important java programming interview questions
20 most important java programming interview questions
 
Introduction To Programming with Python Lecture 2
Introduction To Programming with Python Lecture 2Introduction To Programming with Python Lecture 2
Introduction To Programming with Python Lecture 2
 
Basics of Java
Basics of JavaBasics of Java
Basics of Java
 
OCA Java SE 8 Exam Chapter 2 Operators & Statements
OCA Java SE 8 Exam Chapter 2 Operators & StatementsOCA Java SE 8 Exam Chapter 2 Operators & Statements
OCA Java SE 8 Exam Chapter 2 Operators & Statements
 
Designing function families and bundles with java's behaviors parameterisatio...
Designing function families and bundles with java's behaviors parameterisatio...Designing function families and bundles with java's behaviors parameterisatio...
Designing function families and bundles with java's behaviors parameterisatio...
 
JAVA VIVA QUESTIONS_CODERS LODGE.pdf
JAVA VIVA QUESTIONS_CODERS LODGE.pdfJAVA VIVA QUESTIONS_CODERS LODGE.pdf
JAVA VIVA QUESTIONS_CODERS LODGE.pdf
 
Why functional programming in C# & F#
Why functional programming in C# & F#Why functional programming in C# & F#
Why functional programming in C# & F#
 
Soild principles
Soild principlesSoild principles
Soild principles
 
lazy evaluation
lazy evaluationlazy evaluation
lazy evaluation
 

Chapter 7 review questions

  • 1. Chapter 7 review questions: 1. Define operator precedence and operator associativity? Precedence: defines order and priority of the operator evaluation from different precedence levels. Associativity: defines the order of operators evaluation when it is form the same precedence level. 2. Define functional side effects. When the function changes either one of its parameters or a global variable. 3. What is coercion? Is an implicit type conversion that is initiated by the compiler? 4. What is conditional expression? Evaluate one of the expression's conditions after Boolean control statement is evaluated. 5. What is an overloaded operator? Is an operator with multiple uses. 6. Define narrowing and widening conversions. A narrowing conversion is converting value to type cannot store even approximation of all of the original type. A widening conversion is converting value to type that can include at least approximation of all of values of original type. 7. What is a mixed-mode expression? When the operator can take operands of different types.
  • 2. 8. How does operand evaluation order interact with functional side effects? If the language does not allow functional side effects then the order of evaluating the operands has no effects on the value of the expression. 9. What is short-circuit evaluation? Result is determined without evaluating all of the operands and/or operators. 10.Name a language that always does short-circuit evaluation of Boolean expression. Name one that never does it. Name one which the programmer is allowed to choose. JavaScript always does short-circuit evaluation and Ada allow the programmer to choose. 11.How does C support relational and Boolean expressions? By using numeric types to express the Boolean value 0 for false and 1 for true. 12.What is the purpose of a compound assignment operator? A compound assignment operator is a short hand method of specifying a commonly needed form of assignment. 13.What is the associativity of C's unary arithmetic operators? Associativity is to the right. 14.What is one possible disadvantage of treating the assignment operator as if it were an arithmetic operator? It provide yet another side effect. 15.What mixed-mode assignment are allowed in Ada? Ada does not allow mixed-mode assignment. 16.What mixed-mode assignment are allowed in Java? It allow mixed-mode assignment only if the required coercion is widening.