Machine-translated by Google. Questions are authored in English.
Top

Object Oriented Concepts Questions and Answers

1.

Which of the given options best describes the truthfulness of the following statements?

i) VB.NET is an object-oriented programming language implemented in the .NET Framework.
ii) VB.NET is subset of Visual basic 6.0.
iii) .NET is a free, cross-platform, open-source developer platform for building many different types of applications.

Exam Year(s)

DSSSB TGT - 2023,

Answer: C

Statements i and iii are true and ii is false. VB.NET is an object-oriented language implemented on the .NET Framework, and .NET is a free, cross-platform, open-source developer platform for building many kinds of applications. VB.NET is not a subset of Visual Basic 6.0: it is a later language built on .NET and rewritten in an object-oriented way, so VB6 programs do not run as VB.NET without changes. The options that mark ii as true or i as false are wrong.

Please log in or register to report this question.

2.

Which of the following languages is a non .NET language?

Exam Year(s)

DSSSB TGT - 2023,

Answer: D

Pascal is the non-.NET language among the options. C#, F# and J# are languages designed to run on the .NET platform, compiling to the common intermediate language that the .NET runtime executes. Pascal is the older language not designed for it. Pascal is a procedural language developed in the early 1970s, while the .NET family consists of languages such as C#, F# and Visual Basic that are compiled for the common language runtime.

Please log in or register to report this question.

3.

Which of the following languages are object-oriented programming languages? Languages: i) LISP ii) Java iii) C++ iv) Simula v) SQL vi) C

Exam Year(s)

DSSSB TGT - 2023,

Answer: A

The keyed answer is i, ii, iii and iv only: LISP, Java, C++ and Simula. Java, C++ and Simula are object-oriented languages, and Simula is regarded as the first. LISP is a multi-paradigm language that has object-oriented features through its object system (CLOS), and the key counts it. SQL is a database query language and C is a procedural language, so v and vi are not object-oriented. Many textbooks would leave out LISP, but the official key includes it.

Please log in or register to report this question.

4.

Match of the following is :

(1) C(M) Imperative
(2) Java(N) Functional
(3) Lisp(O) Object oriented
(4) Prolog(P) Constraint based

Exam Year(s)

MH SET - 2018, SET Exam - 2018,

Answer: A

The correct match is 1 - M, 2 - O, 3 - N, 4 - P.

  • C is an imperative (procedural) language: programs are sequences of statements that change state.
  • Java is object oriented: everything is organised in classes and objects.
  • Lisp is the classic functional language, built on function application and lists.
  • Prolog is a logic language in which a program states facts and rules as constraints, and execution searches for values that satisfy them.

The other options call Java constraint based, Lisp object oriented or Prolog functional, which mismatch these well-known paradigms.

Please log in or register to report this question.

5.

In object oriented programming for references and values, which of the following statements are true :

(i) If variables are references, then every object must be created explicitly.
(ii) If variables are values, then object creation can happen implicitly as result.
(iii) If variables are references, then every object must be created implicitly
(iv) If variables are values, then object creation happens explicitly

Exam Year(s)

MH SET - 2019, SET Exam - 2019,

Answer: A

The true statements are (i) and (ii).

With reference semantics, as in Java, a variable holds only a reference. Declaring it creates no object, so every object must be created explicitly, for example with new (i).

With value semantics, as for C++ objects declared as local variables, the variable is the object itself. Declaring it, passing it by value or returning it creates an object implicitly (ii).

Statements (iii) and (iv) reverse these two rules, so every option including them is wrong.

Please log in or register to report this question.

6.

In object oriented programming, an abstraction that holds a collection of objects of some given class is called :

(i) Package list
(ii) Container or collection
(iii) Library
(iv) Directory list

Exam Year(s)

MH SET - 2020, SET Exam - 2020,

Answer: B

The answer is (ii) only: a container or collection.

In object-oriented programming, a container (also called a collection) is an object whose job is to hold a group of other objects, such as a list, set, map or vector, and to provide operations to add, remove and iterate over them.

A package groups classes, a library is a set of reusable code, and a directory list is a file-system listing. None of these is the abstraction that holds objects of a class, so options naming them are wrong.

Please log in or register to report this question.

Loading…
Tags: Object Oriented Concepts Questions and Answers || Object Oriented Concepts MCQ Questions and Answers || Object Oriented Concepts GK Questions and Answers || Object Oriented Concepts GK MCQ Questions || Object Oriented Concepts Multiple Choice Questions and Answers || Object Oriented Concepts GK || GK on Object Oriented Concepts || Object Oriented Programming Questions and Answers || Object Oriented Programming MCQ Questions and Answers || Object Oriented Programming GK Questions and Answers || GK on Object Oriented Programming