220-1002 · Question #411
A technician wants to write a script that will check data line by line until the end of the file. Which of the following elements will perform the check?
The correct answer is A. Loop. A loop is a programming construct that repeats a block of code until a specified condition is met - in this case, reading each line until the end of the file (EOF) is reached. Common examples include 'while' loops and 'for' loops. An Integer (B) is a numeric data type used to…
Question
A technician wants to write a script that will check data line by line until the end of the file. Which of the following elements will perform the check?
Options
- ALoop
- BInteger
- CString
- DVariable
How the community answered
(25 responses)- A92% (23)
- C4% (1)
- D4% (1)
Explanation
A loop is a programming construct that repeats a block of code until a specified condition is met - in this case, reading each line until the end of the file (EOF) is reached. Common examples include 'while' loops and 'for' loops. An Integer (B) is a numeric data type used to store whole numbers. A String (C) is a data type used to store text. A Variable (D) is a named container that holds a value. None of B, C, or D perform iteration; only a loop has the ability to repeatedly process data sequentially until a termination condition (like EOF) is satisfied.
Topics
Community Discussion
No community discussion yet for this question.