Pointer to Structure
typedef struct computer {
char brand[7];
char *cpu;
int ram_size;
} E_Brain;
E_Brain computer1, *ptr;
ptr = &computer1;
(*ptr).ram_size = 640;
strcpy((*ptr).brand, "IBM");
(*ptr).cpu = "pentium";
Previous slide
Next slide
Back to first slide
View graphic version