Computer Science, asked by amruthapadman810, 11 days ago

9. Distinguish between: (a) Integer and floating constant (b) Token and Identifier (c) Character and String constant (d) Character and Boolean literal ​

Answers

Answered by liyashajanrose
8

Answer:

(a)Integer Constants represent whole number values like 2, -16, 18246, 24041973, etc. Floating Constants represent fractional numbers like 3.14159, -14.08, 42.0, 675.238, etc.

(b)A token is the smallest element of a program that is meaningful to the compiler. Identifiers are used to name things like classes, objects, variables, arrays, functions

(c) Character Constants are written by enclosing a character within a pair of single quotes. String Constants are written by enclosing a set of characters within a pair of double quotes. String Constants are assigned to variables of type String.

(d) Character literals are written by enclosing a character within a pair of single quotes. A boolean literal can take only one of the two boolean values represented by the words true or false.

Similar questions