I'm having problems with a segmentation fault on a Linux system. I'm using code from Aho and Ullman's "Foundations of Computer Science" C edition. This is the code
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
typedef struct que_element
{
long mem_address;
long mem_data;
int msg;
} Qq;
typedef struct CELL *LIST;
struct CELL
{
Qq el;
int element;
LIST next;
};
Qq l1element;
typedef struct
{
LIST front;
LIST rear;
} QUEUE;
main()
{
QUEUE *l1c2l1d; /*L1 Controller to L1 Data */
l1c2l1d->front = malloc(sizeof *l1c2l1d);
}
true/false, usetypedef char BOOLEAN. ;)intusually has 4 bytes on 32-bit, whilecharhas always 1 byte.char.