1.

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​

Answer»

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:



Discussion

No Comment Found