3i Infotech Papers: Sample Questions 962 - 965 of 1245

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

Question number: 962

» Languages » C & C Plus Plus

Short Answer Question▾

Write in Short

Can a structure contain a pointer to itself?

Explanation

  • Yes, a structure can contain a pointer to itself

sturct name {int…. . struct name * ptr; };

  • This is called self referential’s structure.

Question number: 963

» Languages » Java

Essay Question▾

Describe in Detail

Which methods are used to destroy the objects created by the constructor methods?

Explanation

Finilize method in inheritance.

Finilize Method in Inheritance.

Finilize method in inheritance.

  • Finalize () is used to destroy the objects created by the constructor methods.

  • Garbage Collector always calls this just before the deletion of object eligible for Garbage Collection, to perform clean-up activity.

  • Clean-up means closing Database Connection, Network Connection or resource de-allocation.

Declaration:

protected void finalize ()

Question number: 964

» Languages » Java

Short Answer Question▾

Write in Short

Brace used in c for what

Explanation

  • Brace used in c for convention.

  • It is used to create a body.

  • The opening brace indicates the start of a segment with the closing brace indicating the end segment.

  • Many opening braces as closing braces.

Question number: 965

» Languages » Java

Essay Question▾

Describe in Detail

Which keyword is used to inherit a class?

Explanation

Understanding of extend inherit class

Understanding of Extend Inherit Class

Understanding of extend inherit class

  • Extends keyword is used to inherit a class.

  • It is overrides all the methods and variables in the parent class there reusability of code is achieved.

Syntax:

class Super

{

…………….

…………….

}

class Sub extends Super

{

……………. .

……………. .

}