What is the output of the following lines of code?

Consider the following statement:
$buffer = a string;
Also consider that a file named test.txt contains the following line of text:
One line of test text.
What is the output of the following lines of code?
$file = “test.txt”;
open (OUT, “<$file”) || (die “cannot open $file: $!”);
read(OUT, $buffer, 15, 4);
print $buffer;

Consider the following statement:
$buffer = a string;
Also consider that a file named test.txt contains the following line of text:
One line of test text.
What is the output of the following lines of code?
$file = “test.txt”;
open (OUT, “<$file”) || (die “cannot open $file: $!”);
read(OUT, $buffer, 15, 4);
print $buffer;

A.
astrOne line of test

B.
astOne line of tes

C.
astrOne line of tes

D.
astOne line of test



Leave a Reply 0

Your email address will not be published. Required fields are marked *