Home / Programming Questions / Perl MCQs / Page 6

Perl MCQs with answers Page - 6

Dear candidates you will find MCQ questions of Perl here. Learn these questions and prepare yourself for coming examinations and interviews. You can check the right answer of any question by clicking on any option or by clicking view answer button.
Share your questions by clicking Add Question

T

Team MCQ Buddy • 9.67K Points
Tutor III

Q. Is boolean type provided in Perl?

(A) Yes
(B) No
(C) ---
(D) ---

T

Team MCQ Buddy • 9.67K Points
Tutor III

Q. What will be the output of the following Perl code?

Code:
$m = 2;

if ($m){
    print "True";
}
else{
    print "False";
}
(A) True
(B) False
(C) Error
(D) None of these

T

Team MCQ Buddy • 9.67K Points
Tutor III

Q. Which of these is the 'True' value in Perl?

(A) ""
(B) 0
(C) 5
(D) All of these

T

Team MCQ Buddy • 9.67K Points
Tutor III

Q. Which of the following is a type of operator in Perl?

(A) Arithmetic Operator
(B) Relational Operator
(C) Ternary Operator
(D) All of these

T

Team MCQ Buddy • 9.67K Points
Tutor III

Q. Logical operators in Perl are ___.

(A) Used to compare values
(B) Used to combine conditions
(C) Used to perform arithmetic operations
(D) None of these

T

Team MCQ Buddy • 9.67K Points
Tutor III

Q. The result of the following operation is

Code:
100 << 3
(A) 001
(B) 300
(C) 800
(D) Error

T

Team MCQ Buddy • 9.67K Points
Tutor III

Q. Which of the following is a valid assignment operator in Perl?

(A) =
(B) ==
(C) +=
(D) %=

T

Team MCQ Buddy • 9.67K Points
Tutor III

Q. What will be the output of the following Perl code?

Code:
$val1 = 5;
$val2 = 10;

$result = $val1 == $val2 ? $val1 : $val2;

print "$result"
(A) 5
(B) 15
(C) 10
(D) 20

Login

Forgot username? click here

Forgot password? Click here

Don't have account? Register here.