Computer Science, asked by haiderali3344, 2 months ago

Which of the following is not a valid identifier?

My book

@book

_book

Book@

Answers

Answered by Anonymous
4

\huge{\bf{\green{\fcolorbox{yellow}{black}{\underline{\color{yellow}{Answer}}}}}}

An identifier is nothing but a name assigned to an element in a program. Example, name of a variable, function, etc. Identifiers are the user-defined names consisting of 'C' standard character set. As the name says, identifiers are used to identify a particular element in a program.

\underline\red{ʜᴏᴘᴇ \: ᴛʜɪs \: ʜᴇʟᴘs✮}

\underline\orange{ʙᴇ \: ʙʀᴀɪɴʟʏ✮}

Answered by anindyaadhikari13
6

Answer:

Here, the invalid identifier are,

  • My book

  • @book

  • Book@

Valid identifier is - _book

Explanation:

  • My name: Invalid as variable name cannot have spaces in between.

  • @Book: Invalid as variable name must not contain any special character (except dollar $ and underscore _)

  • Book@: Invalid for the same reason as above. Variable name must not contain any special character +except dollar $ and underscore _)
Similar questions