Address
:
[go:
up one dir
,
main page
]
Include Form
Remove Scripts
Session Cookies
Open navigation menu
Close suggestions
Search
Search
en
Change Language
Upload
Sign in
Sign in
Download free for days
0 ratings
0% found this document useful (0 votes)
47 views
4 pages
PPL
PPL sppu unit 2
Uploaded by
inventor 110
AI-enhanced title
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Download
Save
Save ppl For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
0 ratings
0% found this document useful (0 votes)
47 views
4 pages
PPL
PPL sppu unit 2
Uploaded by
inventor 110
AI-enhanced title
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Carousel Previous
Carousel Next
Download
Save
Save ppl For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
Download now
Download
You are on page 1
/ 4
Search
Fullscreen
Principles of ‘Structuring the Data, Computations and Program Elementary Data Types a Primitive Data Types © The primitive data types are elementary data types which are not built from some other types. * The values of primitive data types are atomic and cannot be decomposed into simpler constituents. ‘* Many times the built in data types can be interchangeably used with built in data type but there are exceptions. For example - enum in C is a primitive data type which is used to define new constants. ‘* Any programming language has a predefined set of built in data types. This built in data type reflects the behavior of underlying hardware. * Due to built in data type, the values are interpreted differently using hardware instructions. * Following are the types of built in types of programming languages. Numeric types | Boolean type Character type] [= Integer |» Floating- point [= Complex L» Decimal Fig. 2.1.1 Data types 4) Numeric Types : © Integer: © This is the most commonly used data type. © The integer data types can be signed or unsigned data types. o In Java there are singed integer data types such as byte, short, int and long. o In C+ unsigned integer data types are simply the integer values without signs. ‘The unsigned integer data types are typically used for binary data. TECHNICAL PUBLICATIONS® - An up thrust for knowledgePrinciples of Programming Languages 2-3 Structuring the Data, Computations and Program + Floating Point: © The floating point data type is used for representing the real numbers. ‘© On most of the computers the floating point numbers are stored in binary number format. © Floating point values are represented as fractions and exponents. © In most of the languages, there are two types of floating point values - float and double. * Complex: © Complex values are represented as pair of real and imaginary part. © The imaginary part of complex number is represented as literal such as i or. © For example 5 + 7i is a complex number. © Python is a programming language that supports the complex data type. * Decimal © The decimal data type is used to support business systems applications. © This is a type of data type that store fixed number of decimal digits with decimal point at a fixed position in the value. © The languages like COBOL and C# makes use of decimal data type. ‘© The decimal data type values can be stored using a special representation called Binary Coded Decimal(BCD) 2) Boolean Types : * This data type define only two values TRUE and FALSE. * In Boolean algebra the Boolean data type is used. ‘© The basic operations performed are and, not , or. 3) Character Type : © The single character value is represented using char data type. * InC the character type variable is. char choice; ‘Type Structure of C++ ‘The type structure of C++ is divided into two main categories - Fundamental types and derived types. * The fundamental type is - integer and float. The integer data type is classified into int, char, short, long. The float data type is classified into float and double. TECHNICAL PUBLICATIONS® - An up thrust for knowledgePrinciples of Programming Languages 2-5 _ Structuring the Data, Computations and Program Byie Char Shot Int Long Float Double Fig. 2.1.3 Types structure of Java The built in data types : Various data types used in Java are byte, short, int, long, char, float, double and boolean. byte This is in fact smallest integer type of data type. Its width is of 8-bits with the range -128 to 127. The variable can be declared as byte type as byte ij short This data type is also used for defining the signed numerical variables with a width of 16 - bits and having a range from ~32,768 to 32,767. The variable can be declared as short as short a,b; int This is the most commonly used data type for defining the numerical data. The width of this data type is 32-bit having a range 2,147,483,648 to 2,147,483,647. The declaration can be int pas long Sometimes when int is not sufficient for declaring some data then long is used. The range of long is really very long and it is -9,223,372,036854,775,808 to 9,223,372,036,854,775,807. The declaration can be long xy;Principles of Programming Languages 2-6 Structuring the Data, Computations and Program float To represent the real number(i.e. number that may have decimal point) float data type can be used. The width is 32-bit and range of this data type is 3.40282347 x 10%, 1,40239846 x 10°*, double To represent the real numbers of large range the double data type is used. Its width is 64-bit having the range 1.8 x 10°, 4.9 x 10°™* char This data type is used to represent the character type of data. The width of this data type is 16-bit and its range is 0 to 65,536. boolean Boolean is a simple data type which denotes a value to be either true or false. Character String Types A character string type is one in which values are sequences of characters. EXER design issues ‘The two most important design issues for character string types are - 1) Is it a primitive type or just a special kind of character array ? © Cand C++ use char arrays to store char strings. These char strings are terminated by a special character null. * In Java strings are supported by String class whose value are constant string, and the String Buffer class whose value are changeable and are more like arrays of single characters. © C#and Ruby include string classes that are similar to those of Java. «Python strings are immutable, similar to the String class objects of Java. 2) Is the length of objects static or dynamic ? ‘The length can be static and set when the string is created. For example - in C, C++, Java we can have static length string. © When the string length is dynamic then it has no maximum limit. For example - Perl and JavaScript provide this kind of facility.
You might also like
PPL Unit 2 PPT
PDF
No ratings yet
PPL Unit 2 PPT
195 pages
22 - 3014 - 033004 - Unit 2 Part 1 Elementary Data Types
PDF
No ratings yet
22 - 3014 - 033004 - Unit 2 Part 1 Elementary Data Types
146 pages
New - Unit 2
PDF
No ratings yet
New - Unit 2
264 pages
ch6 1-Datatypes
PDF
No ratings yet
ch6 1-Datatypes
84 pages
Module 2 (Data Types)
PDF
No ratings yet
Module 2 (Data Types)
97 pages
05 More On Types
PDF
No ratings yet
05 More On Types
44 pages
Lecture 5
PDF
No ratings yet
Lecture 5
36 pages
PPL Unit02
PDF
No ratings yet
PPL Unit02
153 pages
PPL Notes Unit2
PDF
No ratings yet
PPL Notes Unit2
30 pages
PPL Unit-II - Datatypes Final
PDF
No ratings yet
PPL Unit-II - Datatypes Final
154 pages
Variables: Data Types
PDF
No ratings yet
Variables: Data Types
44 pages
Adobe Scan 05-Dec-2024
PDF
No ratings yet
Adobe Scan 05-Dec-2024
11 pages
1 Data Types
PDF
No ratings yet
1 Data Types
3 pages
Programming Paradigms PP - Module2
PDF
No ratings yet
Programming Paradigms PP - Module2
33 pages
PPL 95
PDF
No ratings yet
PPL 95
10 pages
Chapt 5
PDF
No ratings yet
Chapt 5
40 pages
Unit 2
PDF
No ratings yet
Unit 2
51 pages
Data Types
PDF
No ratings yet
Data Types
12 pages
PPL-Unit 2
PDF
No ratings yet
PPL-Unit 2
45 pages
Introduction To Computer Programming (ICP) : Lecture-7: Data Types
PDF
No ratings yet
Introduction To Computer Programming (ICP) : Lecture-7: Data Types
25 pages
2.1 Data Types Notes
PDF
No ratings yet
2.1 Data Types Notes
4 pages
Data Types in Java
PDF
No ratings yet
Data Types in Java
13 pages
Data Types: CSE 325/CSE 425: Concepts of Programming Language
PDF
No ratings yet
Data Types: CSE 325/CSE 425: Concepts of Programming Language
46 pages
PPL-Unit 2 Part 3
PDF
No ratings yet
PPL-Unit 2 Part 3
12 pages
CS4001NI WK03 T DataTypesandLiterals 82790 158224
PDF
No ratings yet
CS4001NI WK03 T DataTypesandLiterals 82790 158224
23 pages
Data Types
PDF
No ratings yet
Data Types
3 pages
Data Types
PDF
No ratings yet
Data Types
11 pages
Lecture No. 04 (Data Types, Variables and Constants)
PDF
No ratings yet
Lecture No. 04 (Data Types, Variables and Constants)
10 pages
Algorithm Data Type and Data Structure Secured
PDF
No ratings yet
Algorithm Data Type and Data Structure Secured
17 pages
03 Handout 1-Midterms
PDF
No ratings yet
03 Handout 1-Midterms
6 pages
3 Structure
PDF
No ratings yet
3 Structure
16 pages
04 Data Types
PDF
No ratings yet
04 Data Types
13 pages
17-7-23 Data Types in C
PDF
No ratings yet
17-7-23 Data Types in C
3 pages
Variable and Its Data Type
PDF
No ratings yet
Variable and Its Data Type
7 pages
Primary Data Types
PDF
No ratings yet
Primary Data Types
2 pages
Chapter 3 (Data Type)
PDF
No ratings yet
Chapter 3 (Data Type)
2 pages
PPL (Unit2 Data Types)
PDF
75% (4)
PPL (Unit2 Data Types)
43 pages
UNIT-2 Short Answers
PDF
No ratings yet
UNIT-2 Short Answers
12 pages
Data Types in Java and Opearator and Separators
PDF
No ratings yet
Data Types in Java and Opearator and Separators
22 pages
Java Data Types
PDF
No ratings yet
Java Data Types
8 pages
CP1 Module 5 Primitive Data Variables Assignement - Docx N
PDF
No ratings yet
CP1 Module 5 Primitive Data Variables Assignement - Docx N
14 pages
Data Types in Java
PDF
No ratings yet
Data Types in Java
5 pages
Unit-2 PPL Datatypes
PDF
67% (3)
Unit-2 PPL Datatypes
89 pages
MCS 206 DalalTechnologies Aftnuc
PDF
No ratings yet
MCS 206 DalalTechnologies Aftnuc
29 pages
C++ Notes
PDF
No ratings yet
C++ Notes
4 pages
Java Part2 Data Type
PDF
No ratings yet
Java Part2 Data Type
2 pages
Primitive Data Types
PDF
No ratings yet
Primitive Data Types
6 pages
Data Type and Data Structure
PDF
No ratings yet
Data Type and Data Structure
16 pages
Data Type
PDF
No ratings yet
Data Type
4 pages
Data Types in Java
PDF
No ratings yet
Data Types in Java
3 pages
Basic Constructs of JAVA
PDF
No ratings yet
Basic Constructs of JAVA
25 pages
What Is A Data Type
PDF
No ratings yet
What Is A Data Type
5 pages
Lecture 4 - Programming With VB
PDF
No ratings yet
Lecture 4 - Programming With VB
8 pages
Alphabets:: Constants, Variables and Keywords in C
PDF
No ratings yet
Alphabets:: Constants, Variables and Keywords in C
11 pages
Primitive Data Types
PDF
No ratings yet
Primitive Data Types
12 pages
Data Types in Java
PDF
No ratings yet
Data Types in Java
6 pages
Primitive Data Types: Trail: Learning The Java Language Lesson: Language Basics Section: Variables
PDF
No ratings yet
Primitive Data Types: Trail: Learning The Java Language Lesson: Language Basics Section: Variables
5 pages
Data Types: Category of Data Types Will Be Dealt With Later
PDF
No ratings yet
Data Types: Category of Data Types Will Be Dealt With Later
16 pages
ASCII Stands For American Standard Code For Information Interchange
PDF
No ratings yet
ASCII Stands For American Standard Code For Information Interchange
3 pages