Home / MCQ Bank / Computer
Computer Inheritance And Polymorphism In Ruby

Which of the following statements best describes the purpose of the attr_accessor method in Ruby classes?

Select the best option to verify your answer:
Show Correct Answer
Correct Answer: Option D • It defines both reader and writer methods for class attributes

Related Computer Questions

What will be the output of the following C code? #include <stdio.h> int main() { int i = 10; int *p = &i; printf("%d\n", *p++); } Which database management system is often used for handling unstructured data in data science applications? Kadane's algorithm is used to find ______ What will be the output of the following C code? #include <stdio.h> int main() { char *p = NULL; char *q = 0; if (p) printf(" p "); else printf("nullp"); if (q) printf("q\n"); else printf(" nullq\n"); } A processing unit that coordinates networks and data communication is known as