answersLogoWhite

0

Cursor implementation of c program

Updated: 12/22/2022
User Avatar

Wiki User

12y ago

Best Answer

#include<stdio.h>

#include<conio.h>

#include"curslist.h"

void main()

{

LIST L=-1;

POSITION P;

int choice,place,x;

clrscr();

printf("\n1.Create\n2.Insert\n3.Delete\n4.MakeEmpty\n5.Display\n6.Find\n7.Exit");

A:

printf("\nEnter ur choice:\t");

scanf("%d",&choice);

switch(choice)

{

case 1:

if(L==-1)

{

InitializeCursor();

L=CursorAlloc();

}

else

printf("\nList is already created");

break;

case 2:

if(L==-1)

printf("\nList is not yet initialized");

else

{

printf("\nWhere u want to insert?");

scanf("%d",&place);

printf("\nEnter the element to insert");

scanf("%d",&x);

Insert(x,place);

}

break;

case 3:

if(L==-1)

printf("\nList is not yet initialized");

else

{

printf("\nWhich element you want to delete?");

scanf("%d",&x);

Delete(x,L);

}

break;

case 4:

if(L==-1)

printf("\nList is not yet initialized");

else

MakeEmpty(L);

break;

case 5:

if(L==-1)

printf("\nList is not yet initialized");

else

Display();

break;

case 6:

if(L==-1)

printf("\nList is not yet initialized");

else

{

printf("\nWhich element you want to search?");

scanf("%d",&x);

P=Find(x,L);

printf("\nThe element is at %d",P);

}

break;

case 7:

exit(0);

default:

printf("\n *******WRONG ENTRY*******");

}

goto A;

}

User Avatar

Wiki User

12y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Cursor implementation of c program
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

In which language cursor implementation is used?

c is only language that use cursor based implementation


Is cursor implementation possible in queue or stack?

yes,cursor implementation possible in priority queue.


What key moves the cursor to the next line in c program?

The return key.


Array implementation of priority queue example program in c plus plus?

yes


Is there a way to program speech recognition in c plus plus with the express edition not the visual studio version?

The express edition's C++ implementation is no different to the visual studio implementation. It is the exact same language.


C program to implement tower of hanoi using array implementation of stack abstract datatype?

stack abstract datatype


How do you convert a program in turbo c into gcc c?

Code written against Borland compilers is non-portable. You will either have to make the implementation-specific libraries from Borland available to gcc or change the code to eliminate the implementation-specific code.


How do i find the current cursor position in C program?

You cannot do that "in C" but can in TurboC:functions wherex and wherey are you friends. Consult the help.The cursor position, also known as the mouse position, is a function of the operating system, more specifically, not a function of the current window. Other than by hooking the mouse, a complex topic, there is no way to determine the current cursor position.For TurboC: WhereX WhereY from conio.h


Who is covered in NSTP program implementation?

military


Write a program in C language to implement the apriori algorithm?

JavaScript is one program that has been written in C to implement the Apriori algorithm. There are also several other known programs available on the Internet that implement it as well.


How do you set the cursor in turbo c?

gotoXY from conio.h


How do you put a cursor on a facebook page?

Facebook has not CSS program, and usually if you wanna put the cursor, you have to copy and paste "the code" in the CSS box.