write rules for naming a variable
Answers
Answered by
0
Answer:
Rules for naming variables:
All variable names must begin with a letter of the alphabet or an. underscore( _ ). ...
After the first initial letter, variable names can also contain letters and numbers. ...
Uppercase characters are distinct from lowercase characters. ...
You cannot use a C++ keyword (reserved word) as a variable name.
Answered by
1
Rules for naming variables:
➡️Aʟʟ ᴠᴀʀɪᴀʙʟᴇ ɴᴀᴍᴇs ᴍᴜsᴛ ʙᴇɢɪɴ ᴡɪᴛʜ ᴀ ʟᴇᴛᴛᴇʀ ᴏғ ᴛʜᴇ ᴀʟᴘʜᴀʙᴇᴛ ᴏʀ ᴀɴ. ᴜɴᴅᴇʀsᴄᴏʀᴇ( _ ). ...
➡️Aғᴛᴇʀ ᴛʜᴇ ғɪʀsᴛ ɪɴɪᴛɪᴀʟ ʟᴇᴛᴛᴇʀ, ᴠᴀʀɪᴀʙʟᴇ ɴᴀᴍᴇs ᴄᴀɴ ᴀʟsᴏ ᴄᴏɴᴛᴀɪɴ ʟᴇᴛᴛᴇʀs ᴀɴᴅ ɴᴜᴍʙᴇʀs. ...
➡️Uᴘᴘᴇʀᴄᴀsᴇ ᴄʜᴀʀᴀᴄᴛᴇʀs ᴀʀᴇ ᴅɪsᴛɪɴᴄᴛ ғʀᴏᴍ ʟᴏᴡᴇʀᴄᴀsᴇ ᴄʜᴀʀᴀᴄᴛᴇʀs. ...
➡️Yᴏᴜ ᴄᴀɴɴᴏᴛ ᴜsᴇ ᴀ C++ ᴋᴇʏᴡᴏʀᴅ (ʀᴇsᴇʀᴠᴇᴅ ᴡᴏʀᴅ) ᴀs ᴀ ᴠᴀʀɪᴀʙʟᴇ ɴᴀᴍᴇ.
Similar questions