Computer Science, asked by abhinavjain1307, 11 months ago

Assign the constant value of pi (i.e. 3.142) to a variable mentioning its appropriate data type.


d) Identify the following as valid or invalid identifier names.
State reasons.

(i) _123 (ii) break (iii) T$ (iv) var.1​

Answers

Answered by amruthamanisai587
1

Answer:

const float pi=3.142

"break" is not a valid identifier because it is already reserved in keywords so we cannot use it as a identifier name

"_123" is valid identifier because in general the identifier should not start with numbers but an identifier can contain numbers and '_' is the only symbol that can be allowed to use in identifiers name

"T$" is not a valid identifier because we cannot use special character except '_' in identifiers.

"var.1" is not a valid identifier because we cannot use special character except '_' in identifiers.

Explanation:

Similar questions