Every node must contain as its data element either a fixed length array (if you know
the maximum length of the string) or a char* (pointer to a dynamically allocated
array large enough to hold the string).
thanx jsmith, i hav created a structure like this..
struct node
{
char info;
struct node * next;
};
typedef struct node* NODEP;
i am able to insert only the 1st character..
later i dunno how to go to a new node..
this is my code.. please help..
/***************/
#include <stdio.h>
#include <string.h>
#include <conio.h>
struct node
{
char info;
struct node * next;
};
typedef struct node* NODEP;
NODEP getnode(void)
{
// to allocate mem for the new node.
NODEP p;
p=(NODEP)malloc(sizeof(struct node));
return p;
}