Computer Science SLO Based Key Point Notes

👉👉👉 Computer Science 12th Class Notes (Main Page)

************************************

Unit 3: Object-Oriented Programming in C++


3.2.3  Different C++ data types for variable

Integer

  • It is a data type that is used to define numeric variables to store whole numbers, such as -3, 367, +2081, etc.
  • The short form of an integer is int.
  • The following table shows the integer types:


Floating Point

  • It is a data type that is used to define variables that can store numbers that have fractional parts such as 3.75, -2.1, 388.80, etc. These are also known as real numbers.
  • The short form of a floating point is float.
  • The following table shows different types of floating points:

  • In exponential notation, numbers can also be represented. For example, 12345 can be written as 1.2345 x 10⁴. so in a computer program, we can represent it as 1.2345e⁴. Similarly, 0.0098765 is represented in exponential notation as 9.8765e⁻³.

Character

It is a data type that is used to define a variable that can store only a single character.Example: ‘a’, ‘+’, ‘W’, ‘8’, ‘%’ etc.


👇👇👇👇👇👇👇👇👇👇👇👇


************************************
👉👉👉 Computer Science 12th Class Notes (Main Page)

************************************



(National Book Foundation - As Federal Textbook Board, Islamabad 
Based on National Curriculum Pakistan 2026-2027 and Onward prescribed by Federal Board of Intermediate and Secondary Education, Islamabad, and All Pakistan Boards) 

{Contact WhatsApp # +923339719149 for Class-XII Computer Science Complete SLO-Based Key Points notes in pdf format as well as in PowerPoint Presentation for preparing/delivering the Lectures}

Note:  Write me in the comments box below for any query and also Share this information with your class-fellows and friends.