Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

0 Endorsements
~200 People Reached
Favorite Forums
Favorite Tags
c x 3
Member Avatar for dsrepublic

struct tnode { int data; struct tnode* left; struct tnode* right; }; struct tnode*talloc(int data) { struct tnode*p=(struct tnode*) malloc(sizeof(struct tnode)) if (p!=NULL) { p->data=data; p->next=NULL; p->right=NULL; } return p; } int main(){} I am getting a [error: 'NULL' undeclared] error, Any help would be greatly appreciated.

Member Avatar for gerard4143
0
85
Member Avatar for dsrepublic

I'm currently doing MIT Opencourseware's Practical Programming in C. I'm finding pointers a little bit confusing. Here are some questions: 1) int *pa=arr Suppose char * pc = (char*)pa; what value of i satisfies (int *)(pc+i)== pa + 3? [Answer:i=12] I get that the address is 12 bits down because …

Member Avatar for Ancient Dragon
0
115