Perl MCQs with answers Page - 2

Here, you will find a collection of MCQ questions on Perl. Go through these questions to enhance your preparation for upcoming examinations and interviews.

To check the correct answer, simply click the View Answer button provided for each question.

Have your own questions to contribute? Click the button below to share your MCQs with others!

+ Add Question

A

Admin • 802.91K Points
Coach

Q. What is the correct syntax for defining a class in Perl?

  • (A) package class_name
  • (B) class class_name
  • (C) new class class_name
  • (D) new package class_name

A

Admin • 802.91K Points
Coach

Q. Object in Perl an instance of a class?

  • (A) True
  • (B) False
  • (C) ---
  • (D) ---

A

Admin • 802.91K Points
Coach

Q. What is called when an object is created in Perl?

  • (A) Destructor
  • (B) Constructor
  • (C) Variable
  • (D) All of these

A

Admin • 802.91K Points
Coach

Q. What is the correct syntax for creating a new object in Perl?

  • (A) var object_name = new class_name()
  • (B) new object_name = class_name()
  • (C) my object_name = new class_name()
  • (D) None of these

A

Admin • 802.91K Points
Coach

Q. Which of these is not a type of method in Perl?

  • (A) Static method
  • (B) Constant method
  • (C) Virtual method
  • (D) All of these

A

Admin • 802.91K Points
Coach

Q. What is method overwriting in Perl?

  • (A) Filling up method with extra written data
  • (B) Methods that provide extra features
  • (C) A Feature that allows rewriting of methods in child class
  • (D) All of these

A

Admin • 802.91K Points
Coach

Q. Method overwriting can be used to implement run time polymorphism?

  • (A) true
  • (B) false
  • (C) ---
  • (D) ---

A

Admin • 802.91K Points
Coach

Q. Which of these are valid type of inheritance in Perl?

  • (A) Multiple inheritance
  • (B) Multilevel inheritance
  • (C) Hierarchical inheritance
  • (D) All of these

A

Admin • 802.91K Points
Coach

Q. What is multiple inheritance in Perl?

  • (A) When more than two different inheritance takes place in a single program.
  • (B) When a class inherits more than two classes
  • (C) When two classes inherit properties from a single class
  • (D) None of these

A

Admin • 802.91K Points
Coach

Q. What is multilevel inheritance in Perl?

  • (A) A subclass of a class is inherited by another class
  • (B) A class inherits properties from multiple classes
  • (C) Multiple classes inherit properties from a class
  • (D) None of these

Add MCQ in this Category

If you want to share an MCQ question in this category, it's a great idea! It will be helpful for many other students using this website.

Share Your MCQ