Professional Documents
Culture Documents
Engineers
5
Character Handling Library <ctype.h>
6
Example using ctype.h (1)
7
Example using ctype.h (2)
8
Output of using ctype.h
9
String conversions from <stdlib.h>
10
strtod()
Ø The function uses the char ** argument to modify a
char * in the calling function (stringPtr) so that it
points to the location of the first character after the
converted portion of the string or to the entire string
if no portion can be converted.
Ø d = strtod(string, &stringPtr);
indicates that d is assigned the double value
converted from string, and stringPtr is
assigned the location of the first character after the
converted value in string.
11
strtod() Example
12
ASCII Character Set
13
String Functions from <stdio.h>
14
String Functions from <stdio.h>
15
sprintf() Example
16
sscanf() Example
17
String Manipulation in <string.h>
18
Functions: strcpy() and strncpy() (1)
19
Functions: strcpy() and strncpy() (2)
20
Functions: strcat() and strncat() (1)
21
Functions: strcat() and strncat() (2)
22
String Compare
23
String Compare Example – C Code
24
String Compare Example – Output
25
More string functions (1)
26
More string functions (2)
27
strchr()
28
strchr()
29
strcspn()
30
strpbrk()
31
strtok()
32
strtok() Output
33
More functions
34
strlen()
35
Memory Functions
36
memcpy()
37
memmove()
38
memcmp()
39
memchr()
40
memset()
41