Computer Science, asked by arushiprajapati127, 3 months ago

Which of the following is a valid identifier or variable?

1.well&1

2.well 1

3.well_1

4.@well​

Answers

Answered by seenamarythomas
2

Answer:

Explanation:

TRGF

WELL

WELL

3

4

5

Answered by mad210215
4

Identifiers :

Explanation:

  • An identifier is a name that identifies (that is, labels the identity of) either a novel object or a singular class of objects, wherever the "object" or category may be a plan, physical numerable object (or category thereof), or physical noncountable substance (or category thereof).
  • Identifiers are names given to different entities like constants, variables, structures, functions, etc.
  • Example: int amount; double total balance; within the above example, amount and total balances are identifiers and int, and double are keywords.

The rules for the representation of identifier:

  1. A valid identifier must have letters (both uppercase and lowercase letters), digits, and underscores.
  2. The first letter of an identifier ought to be either a letter or an underscore.
  3. You can't use keywords like int, while etc. as identifiers.
  4. There is no rule on however long an identifier is.

According to the above rule, the valid identifier is well_1.

So the correct option is 3.

Similar questions