#include<stdio.h>

/**
 * Terry Harvey CIS 105 Section 010 TA Tina Weymouth
 *  Demonstration program for pointers to char
 **/

int main(){

    char word[30] = "here is a test";
    char * cp;
    //another name for an address is a pointer

    printf("%s\n", word);

    cp = word;

    printf("%p\n", word);      //print an address
    printf("%p\n", &word[0]);  //print an address
    printf("cp is %p\n", cp);  //print an address

    cp = cp + 1; //DON'T DO THIS; instead, use functions like strtok
    printf("cp is %p\n", cp);  //print an address
    printf("%s\n", cp);        //print a string starting at an address

    return 0;

}


