3i Infotech Papers: Sample Questions 952 - 954 of 1245

Examrace Placement Series prepares you for the toughest placement exams to top companies.

Question number: 952

» Languages » Java

Essay Question▾

Describe in Detail

What is the difference between abstract class and interface?

Explanation

Table of Difference Between Abstract Class and Interface

Table of Difference Between Abstract Class and Interface

Interface (Java)

Abstract class (C++)

Supports multiple inheritance

No support for multiple inheritance

No data members

Contains data members

No constructors

Contains constructors

Contains only incomplete members

Contains both incomplete and complete members.

Members of interface cannot be static

Members of abstract class can be static.

Question number: 953

» Languages » C & C Plus Plus

Short Answer Question▾

Write in Short

When will a constructor executed

Explanation

  • Inbuilt or default constructor, no parameter constructor are executes when objects are created.

  • Parameterized constructor execute whenever it is called.

Question number: 954

» Operating System » Windows

MCQ▾

Question

Which function is the entry point for a DLL in MS Windows

Choices

Choice (4) Response

a.

Winmain

b.

Libmain

c.

Dllmain

d.

Main

Answer

c.

Explanation

  • DllMain is a placeholder for a user-defined function which serves as entry point for DLL.

  • On creating a DLL, developer can optionally specify an entry point function.

  • The entry point function is called when processes or threads attach themselves to the DLL or detach themselves from the DLL.

  • Entry point function is used to initialize data structures or to destroy data structures as required by the DLL.

  • Additionally, for multithreaded applications, entry point can be used for initializing thread local storage- to allocate memory private to each thread.