Which of the following is not a valid identifier?

(a) Mybook

(b) @book

(c) _book

(d) book@

 

Answer:

Checking the options:

  • (a) Mybook - It is a valid identifier   
  • (b) @book - It is not a valid identifier since it starts with a special character.   
  • (c) _book - It is a valid identifier    
  • (d) book@ - It is not a valid identifier since it contains a special character.   

So, the correct answer is (b) and (d).

Ask a doubt
Davneet Singh's photo - Co-founder, Teachoo

Made by

Davneet Singh

Davneet Singh has done his B.Tech from Indian Institute of Technology, Kanpur. He has been teaching from the past 14 years. He provides courses for Maths, Science, Social Science, Physics, Chemistry, Computer Science at Teachoo.