Home / Programming Questions / Perl MCQs / Page 2
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
N
Q. Method in Perl is?
N
Q. Is the following statement correct for Perl? "Data Abstraction displays only the essential details to the user"
N
Q. What is the correct syntax for defining a class in Perl?
N
Q. Object in Perl an instance of a class?
N
Q. What is called when an object is created in Perl?
N
Q. What is the correct syntax for creating a new object in Perl?
N
Q. Which of these is not a type of method in Perl?
N
Q. What will be the output of the following Perl code?
use strict; use warnings; package vehicle; sub set_mileage{ my $class = shift; my $self = { 'distance'=> shift, 'petrol_consumed'=> shift }; bless $self, $class; return $self; } sub get_mileage{ my $self = shift; my $result = $self->{'distance'} / $self->{'petrol_consumed'}; print "$result\n"; } my $ob1 = vehicle -> set_mileage(2550, 175); $ob1->get_mileage();
Don't have account? Register here.