3i Infotech Placement: Sample Questions 211 - 212 of 1245

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

Question 211

Edit

Describe in Detail

Essay▾

Does there exist any other function, which can convert an integer or a float to a string?

Explanation

Image Shows the Itoa

Some implementations provide a nonstandard function called itoa () , which convert an integer to string.

#include

char ⚹ itoa (int value, char ⚹ string, int radix) ;

Description:

The itoa () function constructs a string representation of an integer.

Parameters:

  • Value:
    • The integer to be converted to string representation.
    • String:
    • Points to the buffer that will hold resulting string.
    • The resulting string may be as long as seventeen bytes.
    • Radix:
  • The base of the number; must be in the range 2 - 36.

Question 212

Edit

Describe in Detail

Essay▾

What do you mean by inheritance?

Explanation

Understanding of Inheritace
  • A class when it derives properties and characteristics from another class is called inheritance.
  • It is one of the most important feature of object-oriented programming.
  • Sub Class:

    The class that inherits properties from another class is called sub class or derived class.

  • Super class:

    The class whose properties are inherited by sub class is called base class or super class.

  • Inheritance is a technique of code reuse.
  • Provides possibility to extend existing classes by creating derived classes.

Inheritance Syntax:

class DerivedClass: accessSpecifier BaseClass

Developed by: