#include #include // Adding fractions represented with structs typedef struct { int num; int den; } fraction_t; int main() { fraction_t F; F.num=1; // initialize the fraction F to 1/2 F.den=2; fraction_t* p; // pointer to a type fraction_t (which is a struct) // initialize the pointer p = &F; // p points to F (or the memory address where F is stored) printf("Before: %d/%d \n", F.num, F.den); p->num = 3; // change the fraction to 3/4 p->den = 4; printf("After: %d/%d \n", F.num, F.den); system("pause"); }