LIVE Course for free

Rated by 1 million+ students
Get app now
0 votes
59 views
in Information Technology by (54.3k points)
closed by

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

1 Answer

0 votes
by (30.0k points)
selected by
 
Best answer
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.

Welcome to Sarthaks eConnect: A unique platform where students can interact with teachers/experts/students to get solutions to their queries. Students (upto class 10+2) preparing for All Government Exams, CBSE Board Exam, ICSE Board Exam, State Board Exam, JEE (Mains+Advance) and NEET can ask questions from any subject and get quick answers by subject teachers/ experts/mentors/students.

Categories

...