Languages-C & C Plus Plus [3i Infotech Placement]: Sample Questions 308 - 310 of 354

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

Question 308

C & C Plus Plus
Edit

Write in Short

Short Answer▾

How would you implement a substr () function that extracts a sub string from a given string?

Explanation

  • substr (string, position [, count] )
  • Returns the copied string starting at “position” for “count” characters or up to the end of the invoking string object, whichever comes first.
  • If only “position” is supplied, the function returns the string copied starting at index “position” until the end of the invoking string object.
  • If no arguments are supplied, the function returns a string identical to the invoking string object.

Question 309

C & C Plus Plus
Edit

Describe in Detail

Essay▾

What is public, protected, and private?

Explanation

Public:

Public data members and member functions are accessible outside the class.

Protected:

Data members and member functions are only available to derived classes.

Private:

Data members and member function can՚t be accessed outside the class.

The Public, Protected and Private

Question 310

C & C Plus Plus
Edit

Write in Short

Short Answer▾

What are the steps involved in designing?

Explanation

  • Go through the SRS prepared by the System Analyst.
  • Tasks include Architectural Design and Detailed Design.
  • Architectural Design finds the main modules in the problem domain. Detailed Design understands what should be done within each module.

Developed by: