# Match the columns. 1. \a a. backslash 2. \b b. alarm 3. \n c. backspace 4. \\ d. New line

52 views

closed

Match the columns.

 1. \a a. backslash 2. \b b. alarm 3. \n c. backspace 4. \\ d. New line

1. 1 - c,  2 - b, 3 - d, 4 - a
2. 1 - b,  2 - c, 3 - a, 4 - d
3. 1 - b,  2 - d, 3 - c, 4 - a
4. 1 - b,  2 - c, 3 - d, 4 - a

by (30.0k points)
selected

Correct Answer - Option 4 : 1 - b,  2 - c, 3 - d, 4 - a

Explanation:

alarm():

1. \a is used to call the alarm function from the standard library.

2. The alarm() function shall cause the system to generate a SIGALRM signal for the process after the number of real-time seconds specified by seconds have elapsed. Processor scheduling delays may prevent the process from handling the signal as soon as it is generated.

Newline (\n):

A new line is a character used to represent the end of a line of text and the beginning of a new line. In programming languages, such as C, Java, and Perl, the newline character is represented as a '\n' escape sequence.

backspace (\b):

\b by itself only moves the cursor. The usual way of erasing the last character on the console is to use the sequence "\b \b". This moves the cursor one space backward and prints whitespace to erase the character, and backspaces again so that new output starts at the old position.

backslash (\\):

In C,Backslash (\) is an escape sequence character followed by predefined alphabets ( E.g - \t, \b, \r, \n…etc.). It indicates that the character to their right should be interpreted differently.

It's a non-printable character, if you want to print (\), you’ve to use (\\) .

Hence option (4) is the correct answer.