Ask Question
2 May, 12:18

An identifier that is prefixed with an @ and allows you to use code written in other languages that do not have the same set of reserved keywords is known by what name?

+5
Answers (1)
  1. 2 May, 15:02
    0
    Verbatim Identifier

    Explanation:

    Verbatim Identifier contains @ symbol as a prefix by which enables you to use reserved words of a programming language as identifier. For example the keywords like int, double, goto, char, else, while, for, float etc can be used as strings or variable names if @ symbol is added before these words e. g. @char, @while, @void, @int etc. The compiler of a language will recognize such identifiers as verbatim identifiers and compiles them without giving an error that these are reserved words. Verbatim identifier is used for program that is written in other languages and those languages don't have same reserved words. For example: cout<<"use of verbatim identifier"; <<@for; In this statement, for keyword which is used in for loop can be used as an identifier with @ in the prefix. The escape sequences if used with @ symbol in prefix then they are interpreted in a different way. For example in C#

    string a = "//C:/torrent/new/file";

    Console. WriteLine (a);

    This statement will give the following output:

    /C: orrent

    ewfile

    This means that the / t in the start of torrent and / n in the start of new word is taken as an escape sequence and output displayed is giving tab space because of / t and prints the rest of the words in new line because of / n escape sequence.

    Now lets use this with the @ symbol

    string a = @"//C:/torrent/new/file";

    Console. WriteLine (a);

    The output will now be:

    //C:/torrent/new/file

    /t and / n are not taken as escape sequences by the compiler because of @ symbol.
Know the Answer?
Not Sure About the Answer?
Find an answer to your question ✅ “An identifier that is prefixed with an @ and allows you to use code written in other languages that do not have the same set of reserved ...” in 📘 Computers and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers