I hope this presentation will helpful for students
Size: 119.49 KB
Language: en
Added: Sep 23, 2020
Slides: 11 pages
Slide Content
CS8392 Object Oriented Programming CONSTANTS Presented by : Manojkumar Information Technology II-year
What is a Constants? Constants mean the fixed values that do not change during the execution of a program Example: =3.14
Numeric Constants Numeric Constants are used for representing the numerical values. The numeric values can be Integer Real type
Integer Constants Integers means sequence of digits . there are three types Decimal Integer: the decimal integers consist of a set of digits through 0 to 9 Octal Integer: The octal integer consist of a set of 0 to 7 Hexadecimal Integer: It consist of 0 to 9 and letters A to F
Real Constants Real constants contains the floating point parts Example: 0.045 0.006
Character constant A single character constant is enclosed within a pair of single quotes. Example: ‘a’ ‘T’
String constant A string is a collection of characters enclosed within double quotes The characters can be alphabets, numbers, white spaces or special characters. Example: “India” “Best”