home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Hack-Phreak Scene Programs
/
cleanhpvac.zip
/
cleanhpvac
/
GENCSRC.ZIP
/
CHRSTRG.C
< prev
next >
Wrap
C/C++ Source or Header
|
1987-11-21
|
405b
|
16 lines
/* Chapter 7 - Program 1 */
main()
{
char name[5]; /* define a string of characters */
name[0] = 'D';
name[1] = 'a';
name[2] = 'v';
name[3] = 'e';
name[4] = 0; /* Null character - end of text */
printf("The name is %s\n",name);
printf("One letter is %c\n",name[2]);
printf("Part of the name is %s\n",&name[1]);
}