Decimalpoint examplesare3020030034151923e2856etc

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: is known as character set. The C++ character set is as follows:­ Alphabets a ,b , c, d,………………,z A,B,C,D,…………….,Z Digits 0,1,2,3,4,5,…………,9 Special symbols !@#$%^&*()_+|{};:.<>?/|” “.~ 29 Keywords/Reserved words These are the predefined words whose meanings are already explained to the C++ compiler. The keywords can’t be used as variable name because this means that you are trying to assign a new meaning to the key word which is not allowed. They are also called reserved words as these words are reserved in the C++ language library. examples are if, else, do, for. int, float, void, while etc. These are always written in lower case. 30 30 Constants Constants are quantities whose values do not change during the execution of the program . These quantities are fixed and can be stored a location in the memory of the computer. Variables are the holders of constant. They may be numeric, character or string. Types of constants In C++ constants are divided into two main types. 1. Numeric Constants 2. Non­numeric Constants 31 31 Types of constants Numeric Constants Numbers are referred to as numeric constants it is used for numeric purposes it contains : a. Numeric digits 0 to 9 b. Plus(+) or minus(­) sign “ absence of sign is to be considered as (+)sign” c. Decimal point Examples are: 30 , +200, ­300, 3.41519.23e2, 8.56 etc. In C++ numeric constants can be represented in two ways Integer constant Floating point constant 32 32 Variables Or Or Those quantities whose values can be changed during the execution of the program. A variable is a symbol that represents a storage location in the computer...
View Full Document

Ask a homework question - tutors are online