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
Ranked #37.0K
Ranked #4K
~647 People Reached
Favorite Forums
Favorite Tags

4 Posted Topics

Member Avatar for peaceful_soul

[CODE]execlp("some_prog", "some_prog", (char *)0);[/CODE] This is because of the exec functions replace the program running in a process with another program. When a program calls an exec function, that process immediately ceases executing that program and begins executing a new program from the beginning, assuming that the exec call doesn’t …

Member Avatar for peaceful_soul
0
121
Member Avatar for joshmo

[code]scanf("%c", &resp);[/code] The problem is with this part of the code. When you get a prompt "Do you wish to continue? (Y/N): " you are typing in two charaters 1. 'y' 2. '\n' so the second time it prompts it is assuming '\n' as input and exiting the loop. so …

Member Avatar for joshmo
0
108
Member Avatar for nitsmooth

The problem is with: New = (struct node*)malloc(sizeof(struct node*)); //Here you are allocating 4 bytes of memory, sizeof(pointer) is always 4 bytes. so better use: New = (struct node*)malloc(sizeof(struct node)); //Here you are allocating memory required for the node

Member Avatar for nitsmooth
0
318
Member Avatar for RexxX

[code] struct node { char *data; struct node *next; }; typedef struct node* nodePtr; nodePtr newNode; ... int main(void) { newNode = (nodePtr *) malloc(sizeof (nodePtr)); //dynamically allocate [/code] In the above code there is a problem in the last line: [code] struct node { char *data; struct node *next; …

Member Avatar for sukhmal.sena
0
100

The End.