top of page
Search
Writer's pictureHarshit Sharma

Tokens :The smallest individual unit in a program is known as Token.

TOKEN:The smallest individual unit in a program is known as Token Keywords are the words which convey a special meaning to language compiler. Eg. class , if ,else, for ,while,char ,double IDENTIFIERS:These are basically the building blocks of a program used for name of different parts like variables,objects and classes ,functions and many more. LITERALS:These are often referred to as data items that never change their value during a program 1.Integer constant- These are whole number and divided as decimal, octal and hexadecimal 2.Floating constant- These are used to hold decimal number with floating point e.g. 10.4 3.Character constant- These are used to store only one single character in ‘a ‘ single quotes 4.String literal-The one in double quotes is called “ it is a string literal”. PUNCTUATORS:-These are basically the symbols to be used in the program code {}-Opening and closing of a block of code ()-Opening and closing paretheses is used to indicate function call and function parameter ;- This punctuator is used to terminate each statement. []-Opening and closing braces is used to indicate array values OPERATORS: Operators are defined into various categories which is really important to be applied on variables. Binary-These require two operands to operate on.If we want to add,subtract ,divide,multiply and more. Logical-This is used to check whether the statement executes to true or false these are And (&&) and Or (||) Assignment- These are use to assign or check a case E.g a=10 means value of a is 10 but if it is a==10 it means it will check whether a is 10 or not Relational- These are the conditions like < ,>,<=,>=,==,!= Conditional-It is a conditional operator to display wheteher first is true or second It is like a>b?Print a: Print b

1 view0 comments

Recent Posts

See All

Comments


Post: Blog2_Post
bottom of page