Lecture3_handout

Lecture3_handout - Different data types integer data types...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
1 E140: EE140: Programming Concepts for Engineers Lecture 3 1 Data Types and Operations Different data types integer data types char --- 8 bits, small integer numbers short int (short)--- 16 bits, small to medium sized integer numbers int --- 32 bits, medium to large integer numbers long int (long) --- 32 bits, large sized integer numbers real data types float --- 32 bits, low precision real numbers double --- 64 bits, medium precision real numbers 2 long double --- at least 64 bits, medium to high precision real numbers char data type char --- 8 bits, text characters Integer data types Typical size and range of integer data types char need 8 bits (1 byte) memory space ranges from -128 to 127 short int (or short) 16 bits (2 bytes) ranges from -2 15 to (2 15 -1) i.e. -32768 to 32767 int In most cases, the size is 32 bits (4 bytes) ranges from -2 31 to (2 31 -1) if size is 32 bits efault type for any integer constants in C 3 default type for any integer constants in C long int (or long) at least 32 bits (4 bytes) ranges from -2 31 to (2 31 -1) Real data types Typical size and range of real data types float
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 4

Lecture3_handout - Different data types integer data types...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online