Skip to content

Object-Oriented Programming (OOP)

Identify the correct concept described as: a variable defined in a class for which each object of that class maintains its own separate copy.

Difficulty: Medium

About this MCQ

This Medium Object-Oriented Programming (OOP) MCQ checks one syllabus fact.

The question is: “Identify the correct concept described as: a variable defined in a class for which each object of that class maintains its own separate copy.”

The accepted answer is A. Instance variable. Identify the correct concept described as a variable defined in a class for which each object of that class maintains its own separate copy is answered by Instance variable option A Option B Data hiding does not match the stem it is a near-miss used to catch incomplete recall of Instance variable Option C Super keyword does not match the stem it is a near-miss used to catch incomplete recall of Instance variable Remaining alternatives Message passing fall outside the same rule and should be eliminated once Instance variable is identified Object-Oriented Programming OOP questions of this type reward precise definitions rather than approximate associations Object-Oriented Programming OOP recall of this distinction is a regular item in FPSC PPSC NTS.

Correct answer

A. Instance variable

Explanation

Identify the correct concept described as a variable defined in a class for which each object of that class maintains its own separate copy is answered by Instance variable option A Option B Data hiding does not match the stem it is a near-miss used to catch incomplete recall of Instance variable Option C Super keyword does not match the stem it is a near-miss used to catch incomplete recall of Instance variable Remaining alternatives Message passing fall outside the same rule and should be eliminated once Instance variable is identified Object-Oriented Programming OOP questions of this type reward precise definitions rather than approximate associations Object-Oriented Programming OOP recall of this distinction is a regular item in FPSC PPSC NTS.

Source: Object-Oriented Programming (OOP) Official Reference Guide

Tags: computer science, oop, object-oriented programming, software design

Submitted by: MCQsHub Editorial

Related MCQs

More Object-Oriented Programming (OOP) MCQs