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 #44.2K
Hi I am new to c programming language, I have written this small code and I dont know why cant i use the free() here, any clarification highly appreciated. [code=c] int insert(element **head, int d) { element *temp; temp = (element*)malloc(sizeof(element)); if(temp == NULL) { printf("\nError: Failure to allocate memory\n"); … |
|
Hi all, I am a beginner in c, and i am receiving an error in my code, I am writing the code to reverse the elements of a linked list, the code is as follows: [code=c] #include <stdio.h> #include <stdlib.h> typedef struct node { int data; struct node *next; }element; … |