0
#include<stdio.h>
#include<conio.h>
#include<stdlib.h>
struct clink {
    int info;
    struct clink * next;
};
struct clink * start;

void create();
void display();
void main();
{
    [SHOWING ERROR IN THIS LINE "Declaration terminated incorrectly"]

    struct clink *p. *q.
            char ch;
    clrscr();

    start=(struct clink *) malloc (size of(struct link));

    printf("in ent the info;")
    scanf(%d,& start->info);
    do {
        p=start
          printf("in do you wish o continue:");
        ch=getch();
        if(ch='y') {
            create(p);
        }
    }
    while(ch!='n');
    diplay ();
}
void create(struct clink *p)
{
    struct clink * q;
    do {
        p=p-> next;

    }
    while(p->next!=start);

    q=(struct link*)malloc(size of (struct clink));
    printf("in ent the info");
    scanf("%d",& q->info);
    q->next=start;
    p->next=q;
}
void display()
{
    int i;
        =1
         struct clink *p
                 p=start;
    do {
        print("in the element at pos%d,"i,position);
        i++;
        p=p->next;
    }
    while (p)=start);
    }

Edited by Narue: Added code tags and formatting

2
Contributors
1
Reply
2
Views
6 Years
Discussion Span
Last Post by Ancient Dragon
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.