#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);
    }

>>struct clink *p. *q.

That line is constructed incorrectly. struct clink *p, *q;

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.