3i Infotech Papers: Sample Questions 1076 - 1078 of 1245

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

Question number: 1076

» Basic CS » Operating System

Essay Question▾

Describe in Detail

What are the advantages of using typedef in a program?

Explanation

Understanding of typedefination

Understanding of Typedefination

Understanding of typedefination

  • Typedef is a reserved keyword in the C and C++ programming languages.

  • Creates an alias name for another data type.

  • Used to simplify the syntax of declaring complex data structures consisting of struct and union types

  • Also used to provide specific descriptive type names for integer data types of varying lengths.

Question number: 1077

» Languages » Java

Essay Question▾

Describe in Detail

When will you use an inheritance and abstract class?

Explanation

Inheritance

Types of inheritance in java.

Types of Inheritance in Java.

Types of inheritance in java.

  • Extending a class by another class is known as inheritance.

  • Class which is inherited is the parent class, base class, or super class.

  • Class which extends base class is the derived class or child class.

Abstract Class

Abstract class implements the interface.

Abstract Class Implements the Interface.

Abstract class implements the interface.

  • Contains one or more than one abstract method.

  • Cannot create new instance of an abstract class.

  • Is used as base for subclasses.

  • Inheriting an abstract class requires implementations to all its abstract methods.

Question number: 1078

» Languages » Java

Short Answer Question▾

Write in Short

What is the constructor?

Explanation

  • Special method that initializes an object.

  • Usually has the same name as the class, and sets the initial value of the members of an object.

  • Resembles an instance method in java but doesn’t have a return type.

  • Execution sequence of the constructor involves call to parent class constructor followed by derived class.

  • It cannot be inherited.