Character Data Type - PowerPoint PPT Presentation

1 / 13
About This Presentation
Title:

Character Data Type

Description:

String = array of characters terminated by a NULL byte, ... Pascal vs. C Strings. 6F. 6C. 6C. 65. 48. 05. o' l' l' e' H' length. 48. H' 65. e' 6C. l' 6C ... – PowerPoint PPT presentation

Number of Views:25
Avg rating:3.0/5.0
Slides: 14
Provided by: danmc2
Category:
Tags: character | data | string | type

less

Transcript and Presenter's Notes

Title: Character Data Type


1
Character Data Type
char x A // single character char msg1
Hello // character string String msg2
Howdy // String data type
Images were taken from Wikipedia
2
Character Coding
EBCDIC Extended Coded Decimal Interchange Code
(8-bit) ASCII American Standard Code for
Information Interchange (7-bit) Unicode
Character set for almost all international
characters (16-bit)
3
EBCDIC Character Set
Hollerith punched cards
For more information, see http//en.wikipedia.org/
wiki/Punched_card
4
ASCII Character Set
Teletype punched paper tape
For more information, see http//en.wikipedia.org/
wiki/Paper_tape
5
ASCII Character Set
6
ASCII Character Set
7
ASCII Character Set
8
ASCII Character Set
9
Unicode Character Set
  • An extension of ASCII
  • 16 bits give 65,536 possible character
    combinations
  • Includes characters from all major languages of
    the world
  • If the first byte is zero, then the second byte
    is an ASCII character

10
Characters vs. Strings
char single character, represented with single
quotes A String array of characters
terminated by a NULL byte, represented with
double quotes Hello
11
Pascal vs. C Strings
Pascal string
C-string
12
String Manipulation
  • length
  • NULL string
  • concatenate
  • substring
  • parse
  • search
  • creation
  • duplication
  • comparison
  • change case

13
THE END
Write a Comment
User Comments (0)
About PowerShow.com