Answer: D. Prints each DNS query result already stored in variable b
Explanation: Line 3 of the script creates a packet and stores it in the variable 'a'. Line 4 sends the packet and stores the results in the variable 'b'. Lines 5 and 6 loop through the results stored in 'b' and print each DNS query result stored in that variable.
I am as certain as I can be (short of actually executing the code) that B is the best fit among the provided options.
Here's a recap of why the other options are definitively wrong:
A: The query is for www.comptia.org, not for SOA information of the zone.
C: The script loops through the answer records and prints the data within them, not the count of the results.
D: The script doesn't print the entire response object stored in b; it iterates through and prints a specific attribute (.rdata) of the answer records within that response.
Option B, while using the slightly imprecise phrase "raw data output," correctly identifies that a single DNS query is performed for www.comptia.org, and the subsequent lines print some of the data received in the response (specifically the rdata of the answer records).
This section is not available anymore. Please use the main Exam Page.PT0-002 Exam Questions
Log in to ExamTopics
Sign in:
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
RRabbit_111
Highly Voted 9 months agoclutterbie
Most Recent 5 days, 21 hours ago[Removed]
8 months, 1 week ago