first sorry about my english ....
I have a "sortedInsert" function that suppose to take a value an insert it to the correct place in a sorted list.
The SortedInsert MUST have the followin...
Type: Posts; User: chopin17
first sorry about my english ....
I have a "sortedInsert" function that suppose to take a value an insert it to the correct place in a sorted list.
The SortedInsert MUST have the followin...
Thanks Citizen
sorry citizen i didn't see your post before my second reply.
So if I get it right you say that
- malloc allocates memory and "holds" that area until free is called ?
- And if I hadn't use 'x'...
So the x pointer in main is valid because of malloc.
so if we modify the code like this
struct node *create(int val)
{
struct node *ndPtr;
struct node nd;
nd.data = val;
First forgive me about my english ...
suppose we have the following code snippet
#include
struct node
{
int data;