Suppose that you have a structure defined as such.

typedef struct Deity
{
    char name[80];
    char religion[80];
    int numAppendages;
} Deity;

And, suppose you have a pointer to a Diety structure.

Deity* deityPtr;

Assuming that at some point you allocate memory for a Deity structure, assign its address to ‘deityPtr’, and fill in the structure’s fields, how would you call printf() so that it will print the numAppendages value of your Deity structure using dietyPtr? (Specifically, what is the syntax for accessing a field within a structure given a pointer to the structure.)

Do you mean this?

#include <string.h>

typedef struct Deity
{
    char name[80];
    char religion[80];
    int numAppendages;
} Deity;

int main(void)
{
	Deity* pDty = new Deity();
	strcpy(pDty->name, "Fred Johnson");
	strcpy(pDty->religion, "Methodist");
	pDty->numAppendages = 6;

	printf("%s\n%s\n%i", pDty->name, pDty->religion, pDty->numAppendages);

	delete(pDty);
	return 0;
}