πŸ“Š Perl
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
πŸ’¬ Discuss
βœ… Correct Answer: (B) When a class inherits more than two classes

Explanation: In multiple inheritance, one class inherits more than two classes in Perl.

πŸ“Š Perl
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
πŸ’¬ Discuss
βœ… Correct Answer: (A) A subclass of a class is inherited by another class

Explanation: In multilevel inheritance, a subclass of a class is inherited by another class in Perl.

πŸ“Š Perl
Q. What is polymorphism in Perl?
  • (A) Creating multiple constants with the same name
  • (B) Defining multiple methods under the same name
  • (C) Creating multiple variables with the same name
  • (D) All of these
πŸ’¬ Discuss
βœ… Correct Answer: (D) All of these

Explanation: Polymorphism in Perl is defining multiple methods under the same name.

πŸ“Š Perl
Q. What is encapsulation in Perl?
  • (A) Creating Arrays
  • (B) Wrapping up data and related methods to a single unit
  • (C) Creating separate structures storing values
  • (D) All of these
πŸ’¬ Discuss
βœ… Correct Answer: (B) Wrapping up data and related methods to a single unit

Explanation: Encapsulation is wrapping up data and related methods to a single unit in Perl.

πŸ“Š Perl
Q. Encapsulation is also known as?
  • (A) Polymorphism
  • (B) Method overloading
  • (C) Data hiding
  • (D) None of these
πŸ’¬ Discuss
βœ… Correct Answer: (C) Data hiding

Explanation: Data hiding in Perl is also known as Encapsulation.

πŸ“Š Perl
Q. Which function is used by perl for reversing a string?
  • (A) rev
  • (B) reverse
  • (C) split
  • (D) substr
πŸ’¬ Discuss
βœ… Correct Answer: (B) reverse

Explanation: As its name suggest. Reverse is used by perl for reversing a string.

πŸ“Š Perl
Q. Scalar stores
  • (A) Multiple value
  • (B) Single value
  • (C) Double value
  • (D) Float value
πŸ’¬ Discuss
βœ… Correct Answer: (B) Single value
πŸ“Š Perl
Q. When you're pattern matching, you describe the pattern using
  • (A) A string in double quotes
  • (B) A MySQL select statement
  • (C) A regular expression
  • (D) A template
πŸ’¬ Discuss
βœ… Correct Answer: (B) A MySQL select statement
πŸ“Š Perl
Q. When the "require" function loads?
  • (A) Runtime
  • (B) Compile time
  • (C) Both
  • (D) None
πŸ’¬ Discuss
βœ… Correct Answer: (A) Runtime
πŸ“Š Perl
Q. Which of the following statement repeats a statement or group of statements until a given condition becomes true. It tests the condition before executing the loop body?
  • (A) while
  • (B) until
  • (C) for
  • (D) none of the above
πŸ’¬ Discuss
βœ… Correct Answer: (B) until