IEO Level 2- English Olympiad (SOF) Class 9 Coaching Programs
β³ π― Online Tests (2 Tests [50 Questions Each]): NTA Pattern, Analytics & Explanations
Click Here to View & Get Complete Material
Rs. 200.00
3 Year Validity (Multiple Devices)
π Study Material (303 Notes): 2024-2025 Syllabus
Click Here to View & Get Complete Material
Rs. 450.00
3 Year Validity (Multiple Devices)
π― 250 MCQs (& PYQs) with Full Explanations (2024-2025 Exam)
Click Here to View & Get Complete Material
Rs. 200.00
3 Year Validity (Multiple Devices)
Introduction to C ++ : 3 C ++ Character Set and Basic Data Types
3 C ++ Character Set
- Character set is a set of valid characters that a language can recognized. A character represents any letter, digit, or any other special character.
- The C ++ has the following character set.
Basic Data Types
- Every program specifies a set of operations to be done on some data in a particular sequence.
- However, the data can be of many types such as a number, a character, Boolean value etc. C ++ supports a large number of data types.
Integer Type (Int)
- An integer is an integral whole number without a decimal point.
- These numbers are used for counting. These numbers are used for counting.
- Normally an integer can hold numbers from -32768 to 32767.
- However, if the need be, a long integer (long int) can also be used to hold integers from -2, 147,483, 648 to 2, 147,483, 648.
Floating Point Type (Float)
- A floating-point number has a decimal point.
- Even if it has an integral value, it must include a decimal point at the end. These numbers are used for measuring quantities.
- Examples of valid floating-point numbers are:
- A float type data can be used to hold numbers from with six or seven digits of precision
- However, for more precision a double precision type (double) can be used to hold numbers from with about 15 digits of precision.
3 Character Type (Char)
- It is a non-numeric data type consisting of single alphanumeric character. Examples of valid character types are: βAβ , β9β , βPβ , β8β , β&’ .
- It may be noted here that 9 and β9β are of different data types.
- The former is of type int and later of type char.