B
Bill Cunningham
I have been trying to understand dereferncing better and came across a
tutorial that showed this.
int *x;
pointer allocated /does that allocate memory for an int/
or do I need to add this?
x=malloc(sizeof(int));
I've never worked knowledgably with this. And if I set the pointer to a
value, I wouldn't need malloc right?
int *x;
int y=42;
x=&y;
No malloc needed for x or y right? I've never needed it before.
Bill
tutorial that showed this.
int *x;
pointer allocated /does that allocate memory for an int/
or do I need to add this?
x=malloc(sizeof(int));
I've never worked knowledgably with this. And if I set the pointer to a
value, I wouldn't need malloc right?
int *x;
int y=42;
x=&y;
No malloc needed for x or y right? I've never needed it before.
Bill