Computer Science, asked by meenaanitamukesh1980, 4 months ago

Check the validity of the following identifiers:

(i) Mybook (ii) 2rno (iii) z2td (iv) date_2 (v) data-cs

Give the reason why some of these identifiers are invalid​

Answers

Answered by anindyaadhikari13
2

\star\:\:\:\sf\large\underline\blue{Answer:-}

  1. Mybook is a valid identifier.
  2. 2rno is an invalid identifier. Reason:- identifier name must not start with a digit.
  3. z2td is a valid identifier.
  4. date_2 is a valid identifier.
  5. data-cs is an invalid identifier. Reason:- Hyphens are not allowed while naming an identifier.
Similar questions