TCS Papers: Sample Questions 447 - 448 of 502

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

Question number: 447

» Languages » C & C Plus Plus

MCQ▾

Question

Which of the following cannot be used with the keyword virtual?

Choices

Choice (4) Response

a.

Constructor

b.

Destructor

c.

Class

d.

Member functions

Answer

a.

Explanation

  • A constructor cannot be virtual.

  • Virtual keyword makes a virtual table to map function at run-time with help of Vptr (virtual pointer).

  • Now this virtual pointer Vptr is the first 4 bytes of the object.

  • So if the constructor has been called then the Vptr has to be present in the object allocation- that means the constructor must already have been called

Question number: 448

» Basic CS » Data Structures

Essay Question▾

Describe in Detail

What is Manifest?

Explanation

  • Assembly metadata is stored in Manifest. Manifest contains all the metadata needed to do:

    • Version of assembly

    • Security identify

    • Scope of the assembly

    • Resolve references to resources and classes

  • Assembly manifest can be stored in a PE file either (an. exe or. dll) with Microsoft intermediate language (MSIL code) or in a stand-alone PE file, containing only assembly manifest information.

  • Every assembly- both static and dynamic contains data to describe how elements in the assembly relate to each other.

  • The assembly manifest contains this assembly metadata.

  • Assembly manifest contains metadata to specify the assembly’s version requirements and security identity, and metadata to define the scope of the assembly and resolve references to resources and classes.

Image shows the manifest

Image Shows the Manifest

Given the image is defining the block diagram will help you to understand manifest