3i Infotech Papers: Sample Questions 987 - 988 of 1245

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

Question number: 987

» Basic CS » Operating System

MCQ▾

Question

The command “grep first second third/usr/you/myfile”

Choices

Choice (4) Response

a.

prints lines containing the words first, second or third from the file/usr/you/myfile

b.

searches the files/usr/you/myfile and third for lines containing the words first or second and prints

c.

searches for lines containing the pattern first in the files second, third, and/usr/you/myfile and prints them

d.

replaces the word first with the word second in the files third and/usr/you/myfile

Answer

c.

Explanation

  • The command grep first second third/usr/you/myfile searches for lines containing the pattern first in the files second, third, and/usr/you/myfile and prints them.

  • The grep searches a file for a particular pattern of characters and displays all lines that contain that pattern.

  • The pattern searched in the file is referred as the regular expression.

  • Output line longer than terminal width wraps around to the following lines, but this output corresponds to exactly one line in FILE.

Syntax:

grep [optionas] pattern [files]

grep [options] [-e pattern|-f file] [file…. ]

Question number: 988

» Basic CS » Algorithms

Short Answer Question▾

Write in Short

Hexadecimal equivalent of

Explanation

Answer is achieved by diving by

Table of Division by 16

Table of Division by 16

Division by

Quotient

Remainder (decimal)

Remainder (hex)

Digit

So,