Q. Which of the following identifier names are invalid and why?
(a) Serial_no.
(b) 1st_Room
(c) Hundred$
(d) Total Marks
(e) Total_Marks
(f) total-Marks
(g) _Percentage
(h) True
Answer:-
(a) Serial_no. : - Invalid because it contains special character dot (.)
(b) 1st_Room :- Invalid because starting with a digit
(c) Hundred$ :- Invalid because it contains special character $
(d) Total Marks :- Invalid because of space between them
(e) Total_Marks :- Valid identifier
(f) total-Marks :- Invalid because it contains special character -
(g) _Percentage :- Valid identifier
(h) True :- Invalid because it is reserved keyboard
Thank you : )
ReplyDeleteCan i get final exam question Paper 😅
ReplyDeleteSorry 😔
DeleteReserved ‘keyword’, not keyboard
ReplyDelete???
Deletecheck your answer you have written keyboard instead of keyword
DeletePost a Comment
You can help us by Clicking on ads. ^_^
Please do not send spam comment : )