This document defines and categorizes numeric literals, integer literals, floating point literals, boolean literals, operators, and punctuators in programming. It explains that numeric literals include integers, floating point numbers, and complex numbers. Integer literals must contain only digits and can be decimal, octal, or hexadecimal. Floating point literals are in fractional or exponent form. Operators are symbols that represent operations and include arithmetic, bitwise, shift, relational, assignment, logical, and membership operators. Punctuators organize program syntax and include brackets, parentheses, and separators.
This document defines and categorizes numeric literals, integer literals, floating point literals, boolean literals, operators, and punctuators in programming. It explains that numeric literals include integers, floating point numbers, and complex numbers. Integer literals must contain only digits and can be decimal, octal, or hexadecimal. Floating point literals are in fractional or exponent form. Operators are symbols that represent operations and include arithmetic, bitwise, shift, relational, assignment, logical, and membership operators. Punctuators organize program syntax and include brackets, parentheses, and separators.
This document defines and categorizes numeric literals, integer literals, floating point literals, boolean literals, operators, and punctuators in programming. It explains that numeric literals include integers, floating point numbers, and complex numbers. Integer literals must contain only digits and can be decimal, octal, or hexadecimal. Floating point literals are in fractional or exponent form. Operators are symbols that represent operations and include arithmetic, bitwise, shift, relational, assignment, logical, and membership operators. Punctuators organize program syntax and include brackets, parentheses, and separators.
int (signed integers) : Negative or Positive whole
numbers
float (floating point real values) : Numbers having
decimal point
complex (complex numbers) : Numbers having real and
imaginary part Integer Literals Must have at least one digit Must not contain decimal point May contain a positive or negative sign Commas can not appear in it
Types of integer literals
(i) Decimal integer literals : starting with non zero (ii) Octal integer literals : starting with 0o (iii) Hexa Decimal integer literals : starting with 0X or 0x Floating Point Literals : (i) Fractional form : at least one digit with a decimal point before or after. (ii) Exponent form : containing two parts Mantissa and Exponent, separated by E The Mantissa part must be either an integer or a real constant. The Exponent part must be an integer. Boolean Literals : Represent the values True and False Operators :
Operators are the symbols which represent some
predefined operations on constants, variables or objects (Operands)