ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 86 - CTAL-TTA discussion

Report
Export

When conducting a data flow analysis of following section of pseudo code:

Declare Function_Biggest integer (inputl integer. Input2 Integer) }

Declare output Integer

Set output = inputl

If input2 > output then

Set output = input2

Endif

Return output

}

Which of the variables utilized above has a potential anomalie?

A.
Inputl and input2
Answers
A.
Inputl and input2
B.
None of the variables
Answers
B.
None of the variables
C.
output
Answers
C.
output
D.
Function_Biggest
Answers
D.
Function_Biggest
Suggested answer: C

Explanation:

In the data flow analysis of the pseudocode, the variable output presents a potential anomaly. Initially, output is set to input1, but it may be overwritten if input2 is greater. The anomaly, specifically a 'definition-use' (du-path) issue, arises because there might be scenarios where output does not adequately reflect changes depending on the dynamic data flow influenced by the conditional. Proper testing and validation of such conditional structures are crucial to ensure that output consistently represents the largest of the two inputs as intended.

asked 18/09/2024
Nael Abal
33 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first