
Originally Posted by
laserlight
Yes.
Yes, but that's a self-referential tautology and hence doesn't really mean anything useful. What you probably meant to say is that you think that the next pointer of the first node points to the second node of the list, and indeed that should happen.
I am stuck in function
Code:
#include<stdio.h>
#include<stdint.h>
#include<stdlib.h>
struct node
{
int data;
struct node * next;
};
// Type Function (Type)
struct node * current = malloc(sizeof(*current);
if ( current != NULL )
{
current -> data = value;
current -> next = ;
if( head == NULL )
{
head = current ;
}
else
{
tail = current ;
}
}
int main ()
{
struct node * head;
struct node * tail;
return 0;
}