// file: my first program // #include #include #include // my main program starts here // int main(int argc, char** argv) { char chr = 'a'; char chr2 = 'b'; fprintf(stdout, "the address of chr is %p (%lu)\n", &chr, &chr); fprintf(stdout, "the value of chr is %c\n", chr); fprintf(stdout, "the address of chr2 is %p (%lu)\n", &chr2, &chr2); fprintf(stdout, "the value of chr2 is %c\n", chr2); char str[] = "Joe"; fprintf(stdout, "the address of str is %p (%lu)\n", str, str); fprintf(stdout, "the value of str[0] is %c (%c)\n", str[0], *str); fprintf(stdout, "the value of str is %s\n", str); float sum = 27.0; fprintf(stdout, "the value of sum is %f (%f)\n", sum, *(&sum)); char* pstr = str; for (long i=0; i<4; i++) { fprintf(stdout, "addr of pstr = %lu (%c)\n", pstr, *pstr); pstr++; } // exit gracefully // return 0; }