3i Infotech Papers: Sample Questions 1236 - 1238 of 1245

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

Question number: 1236

» Languages » C & C Plus Plus

Essay Question▾

Describe in Detail

Differentiate Aggregation and containment?

Explanation

  • Aggregation: -

    • Aggregation is the relationship between the whole and a part. Some properties can be added or subtracted from part without affecting the whole.

    • Best example is Car, which contains the wheels and some extra parts. Even if parts are not there it can still be called a car.

  • Containment: -

    • In containment whole is affected when the part is affected.

    • For example: human body dies if the parts (heart etc) die.

Question number: 1237

» Basic CS » Operating System

MCQ▾

Question

The redirection operators and

Choices

Choice (4) Response

a.

do the same function

b.

differ: write to any file while write only to standard output

c.

differ: is used for input while is used for output

d.

differ: overwrites, while appends

Answer

d.

Explanation

  • ’ redirects the output to file by creating it and if the file already exist it overwrites it without user intimation. A new file is created if a file does not exist.

  • ’ redirects the output to a file by creating it and if the already exist, it is appended.

Question number: 1238

» Languages » C & C Plus Plus

Short Answer Question▾

Write in Short

What is function that extracts a sub string from a given string?

Explanation

  • Substring (string, position [, count] )

  • Extract substring starting from start and going for count characters.

  • If count is not specified, the string is clipped from the start till the end