cp_1_lect_20 - 5/10/10 Constants C Constants Primary...

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

View Full Document Right Arrow Icon
5/10/10 Constants C Constants Primary constants Secondary constants Numeric Character Integer Real Charact er String Array Structure Pointer Union etc. -245 0 340 -32768 to 32767 023 065 0x3f 0XaB1 56.2 -6. .2 1.2E4 22e-3 -0.3e+3 ‘A’ ‘5’ ‘;’ printf(“%d”, ‘a’) printf(“%c”, ‘97’) “hi!” “very good” “6+5*4” “a” != ‘a’
Background image of page 1

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

View Full DocumentRight Arrow Icon
5/10/10 Constants Continued… Escape Sequence ‘\a’ ‘\b’ ‘\n’ ‘\t’ ‘\v’ ‘\’’ ‘\”’ ‘\?’ ‘\\’ ‘\0’ ‘\f’ ‘\r’ Null Character ‘\0’ and Empty String Eight, zero bits String containing nothing “ ” ‘a’ != “a” because ‘a’ has an equivalent integer value but “a”
Background image of page 2
5/10/10 Data Types in C
Background image of page 3

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

View Full DocumentRight Arrow Icon
5/10/10 Data Types Continued… Type Size Range int 16 -32,768 to 32,767 unsigned int 16 0 to 65,535 short int 8 -128 to 127 long int 32 -2,147,483,648 to 2,147,483,647 float 32 3.4E-38 to 3.4E+38 double 64 1.7E-308 to 1.7E+308 long double 80 3.4E-4932 to 1.1E+4932 char 8 -128 to 127 unsigned char 8 0 to 255 On a 16 bit machine
Background image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 6

cp_1_lect_20 - 5/10/10 Constants C Constants Primary...

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

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