Identify the types of following literals: 23.789,234567,True,'True',
Answers
Answer:
23.789-floating literal
234567-integer literal
True-boolean literal
'True' is actually wrong.Use double quotes for multiple characters.
"True"-string literal
Hope it helps
Explanation:
Answer:
Literals are the values that are assigned as constants to the constant variables. The fixed values that cannot be changed can be said to be represented by the literals. While references are not variables, it also has memory. Constant integer expressions can be written as const int =10; for instance, where 10 is an integer literal.
Explanation:
23.789-floating literal
234567-integer literal
True-boolean literal
'True' is actually wrong.Use double quotes for multiple characters.
"True"-string literal
Literals are data used for representing fixed values. They can be used directly in the code. For example, int a = 1; float b = 2.5; char c = 'F';