meaning of statement missing in turbo c program
What is the meaning of "statement missing" in turbo c program
Collapse
X
-
Tags: None
-
hi sandytayag021
place your code here.
There might be possibility of missing (;) any many place.
happy coding..Comment
-
whats wrong in this program
#include<stdio. h>
struct node
{
int data;
struct node*next;
};
typedef struct node node;
node *start==NULL;
node* create();
void display();
node* getnode();
int main()
{
int n;
node *list
node *list1=NULL,*li st2=NULL;
printf("create list1 ");
list1=create();
printf("create list2");
list2=create();
printf("display ing the list1");
display(list1);
printf("display ing the list2");
display(list2);
return 0;
}
node* getnode()
{
node *newnode=(node* )malloc(sizeof( node));
printf("enter data into node");
scanf("%d",newn ode->data);
newnode->next=NULL;
return newnode;
}
node*create()
{
int n,i,;
printf("enter no of nodes to enter");
scanf("%d",&n);
newnode=getnode ();
for(i=0;i<n;i++ )
{
if(start==NULL)
{
start=newnode;
}
else
{
temp=start;
while(temp->next!=NULL)
{
temp=temp->next;
temp->next=newnode ;
}
return list;
}
node*display(li st)
{
node*temp;
temp=start;
if(start==NULL) ;
{
printf("empty list");
}
else
{
while(temp!=NUL L)
{
printf("%d->",temp->data);
temp=temp->next;
}
printf("x");
}
}Comment
-
Please start your own thread rather than hijackng this 3-year-old thread.
Describe your question or problem - it may be different from that of the old post.
Please use CODE tags around your source code -- this preserves indentation and provides line numbers.
I did notice near the beginning of your code that
node *start==NULL;
Should be
node *start=NULL;Comment
Comment