Languages [3i Infotech Placement]: Sample Questions 290 - 293 of 546

Glide to success with Doorsteptutor material for competitive exams : get questions, notes, tests, video lectures and more- for all subjects of your exam.

Question 290

Edit

Write in Short

Short Answer▾

In C ++ there is only virtual destructor, no constructors. Why?

Explanation

  • Constructors are invoked at the time of object creation.
  • V-table for virtual function mechanism is not initialised properly during the constructor invocation and hence there is no possibility if virtual constructors
  • Destructors can virtual.
  • V-table is properly initialised at the time of object creation.
  • V-table is available for the destructors.

Question 291

Languages
Edit

Write in Short

Short Answer▾

Can we declare variable inside a method as final variables? Why?

Explanation

No, method variables cannot be final as such a variable is initialized once for each method scope which is not allowed for final variables.

Question 292

Edit

Write in Short

Short Answer▾

How can we read/write structures from/to data files?

Explanation

  • Programs can write a structure using fwrite () and a corresponding fread () invocation will read them back in.
  • Data files are ⚹ not ⚹ portable.
  • Pointers in structure will write address values most likely to be in valid when read back.

Question 293

Languages
Edit

Write in Short

Short Answer▾

Short int________

Explanation

  • bit.
  • The size of short int (signed or unsigned) is bytes or bits.
  • Signed and Unsigned differs only in the range of the value.
  • Signed short int ranges from to .
  • Unsigned short ranges from .
  • The maximum signed bit integer is

Developed by: