char - Character Processing How characters can be treated...

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

View Full Document Right Arrow Icon
1 Character Processing How characters can be treated as small integers? How characters are stored and manipulated in a machine? How use is made of certain standard header files?
Background image of page 1

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

View Full DocumentRight Arrow Icon
2 Fundamental Data Type stored in one Byte . 2 8 =256 different combos. Letters, Digits, Special Characters. A character constant is written between single quotes . char c = ‘s’; Data Type char
Background image of page 2
3 In C a char has the integer value corresponding to the Binary Coding Scheme in effect (ASCII ). See page 174 . Letters : ’a’, ‘b’ ……….’z’ 97 98 ……….112 ‘A’, ‘B’ ………’Z’ 65 66 ………. 90 Digits : ‘0’, ‘1’ ………. . ‘9’ 48 49 57 Others : ‘+’ ……… 38 43
Background image of page 3

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

View Full DocumentRight Arrow Icon
A “ %c ” is used to designate the char format. The content of the Byte can be thought of as either a character or as a small integer . printf ( “% c ”, ‘a’) ? printf ( “% d ”, ‘a’) ? printf ( “%
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.

This note was uploaded on 11/08/2011 for the course CSCE 206 taught by Professor Hurley during the Spring '11 term at Texas A&M.

Page1 / 17

char - Character Processing How characters can be treated...

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