Question about Operating Systems

1 Answer

I want circularlinklist program in c++ - Operating Systems

Posted by on

  • Anonymous Mar 07, 2009

    i want also display function in circular link list.pls send soution quickly

×

1 Answer

  • Level 2:

    An expert who has achieved level 2 by getting 100 points

    MVP:

    An expert that gotĀ 5 achievements.

    Sniper:

    An expert who has posted more than 50 answers, of which 90% or more were rated as helpful.

    Governor:

    An expert whose answer gotĀ voted for 20 times.

  • Expert
  • 50 Answers

This C++ program is to perform the following operations
on a circular linked list
1)insertion
2)forward traversal
3)reverse traversal
4)search
->node structure :
a node contains
1) integer data
2) pointer to next node
-> This program works in microsoft VC++ environment
in windows xp
-> This program uses the following header files
1)iostream.h
********************************************************/
#include<iostream.h>
class cll
{
private:
int data;
cll *next;
public:
cll* insert_one(int,cll*);
cll* delete_one(int,cll*);
void ftraverse(cll*);
void rtraverse(cll*);
void search(int,cll*);
void function();
};
cll*hd;
void cll::function()
{
cout<<”******************************************\n”;
cout<<”program to implement a circular linked list \n”;
cout<<”******************************************\n”;
cll * head;
head=NULL;
cout<<”\n\nMENU :\n”;
cout<<”1)insertion\n”
<<”2forward traversal\n”
<<”3)reverse traversal\n”
<<”4)search\n”
<<”5)exit\n\n”;
cout<<”Enter your option :”;
int opt;
cin>>opt;
int d;
while(opt!=5)
{
switch(opt)
{
case 1:
cout<<”Enter data to the node :”;
cin>>d;
head=insert_one(d,head);
cout<<”inserted\n”;
break;
case 2:
cout<<”The forward traversal is :\n”;
ftraverse(head);
break;
case 3:
cout<<”The reverse traversal is :\n”;
hd=head;
rtraverse(head);
cout<<”NULL\n”;
break;
case 4:
cout<<”Enter the element to be searched :”;
int d;
cin>>d;
search(d,head);
break;
case 5:
break;
default:
cout<<”invalid option”;
break;
}
cout<<”\n\nMENU :\n”;
cout<<”1)insertion\n”
<<”2)forward traversal\n”
<<”3)reverse traversal\n”
<<”4)search\n”
<<”5)exit\n\n”;
cout<<”Enter your option :”;
cin>>opt;
}
}
cll* cll::insert_one(int d,cll* c)
{
cll*NEW;
NEW=new cll;
NEW->data=d;
NEW->next=NULL;
if(c==NULL)
{
c=NEW;
c->next=c;
}
else
{
cll*c1=c;
while(c1->next!=c)
c1=c1->next;
c1->next=NEW;
NEW->next=c;
}
return c;
}
void cll::ftraverse(cll* c)
{
if(c==NULL)
{
cout<<”\nlist empty\n”;
return;
}
else
{
cll *c1=c;
cout<<c1->data<<”->”;
c1=c1->next;
while(c1!=c)
{
cout<<c1->data<<”->”;
c1=c1->next;
}
cout<<”NULL\n”;
}
}
void cll::rtraverse(cll* c)
{
if(c->next==hd)
{
cout<<c->data<<”->”;
return;
}
else
rtraverse(c->next);
cout<<c->data<<”->”;
}
void cll::search(int d,cll* c)
{
cll*c1=c;
if(c==NULL)
{
cout<<”\nlist empty\n”;
return;
}
else
{
if(c->data == d)
{
cout<<”found\n”;
return ;
}
while(c->next !=c1)
{
if(c->data==d)
{
cout<<”found\n”;
return ;
}
c=c->next;
}
if(c->data ==d)
{
cout<<”found\n”;
return ;
}
cout<<” search unsuccess ful \n”;
}
}
void main()
{
cll list;
list.function();
}

Posted on Mar 06, 2009

Add Your Answer

Uploading: 0%

my-video-file.mp4

Complete. Click "Add" to insert your video. Add

×

Loading...
Loading...

Related Questions:

1 Answer

How to program


Please be specific about WHAT do you want to program. do you want to learn a programming language?
Many programming languages or procedures have good tuotrials and books
Like C++

Programming and Programming

PHP

PHP Programming

JAVA

1 Elements of Programming

Visual Basic

https://msdn.microsoft.com/library/xk24xdbe%28v=vs.90%29.aspx


and so on...

Sep 07, 2015 | Operating Systems

1 Answer

How to delete aim


not sure what AIM is or what you are referring to.
If its a program

You should always remove and uninstall programs from your PC that you are not using. It could be beneficial to your computer's productivity and functioning to free up space. You run the risk of running out of space on your computer if you add too many programs without uninstalling some. It is a relatively easy process, but you should be sure you are not removing a program that is necessary to the operation of your computer.

Click "Start" and select "Programs." Click "Control Panel" and "Programs" and "Programs and Features." Browse the list of programs on your computer and select one that you want to remove. Click "Uninstall." You may be prompted for permission from the administrator to remove the program. Enter the administrator password or confirmation if necessary. Check the properties of the program if it is not listed in "Programs." You can do this by right-clicking on the program desktop icon and selecting "Properties." Check to see if the program is compatible with the version of Windows that you are using. Click "Start" and "Run," to manually remove the programs if the uninstall option does not completely uninstall the program. Type "Regedt32" in the box and click "OK." Locate the "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall" registry key and click "Export" under the "File" tab. Click "Desktop" on the "Export Registry File" dialog box. Type "Uninstall" in the "File Name" box and select "Save." The left panel of the Registry Editor will display the programs that are currently installed. Right-click the key in the left panel of the Registry Editor window. Click "Delete." Click "Yes" when you are asked to confirm deletion of the program. Click the "File" menu and select "Exit." This will exit the Registry Editor. Click "Start" and "Control Panel" and click "Add or Remove Programs." Confirm that the program is no longer listed here.

Feb 18, 2013 | Microsoft Windows 7 Home Premium 64BIT...

1 Answer

Delet my ultimate team fifa13


Not sure what ultimate team fifa 13 is if its a computer program

You should always remove and uninstall programs from your PC that you are not using. It could be beneficial to your computer's productivity and functioning to free up space. You run the risk of running out of space on your computer if you add too many programs without uninstalling some. It is a relatively easy process, but you should be sure you are not removing a program that is necessary to the operation of your computer.

Click "Start" and select "Programs." Click "Control Panel" and "Programs" and "Programs and Features." Browse the list of programs on your computer and select one that you want to remove. Click "Uninstall." You may be prompted for permission from the administrator to remove the program. Enter the administrator password or confirmation if necessary. Check the properties of the program if it is not listed in "Programs." You can do this by right-clicking on the program desktop icon and selecting "Properties." Check to see if the program is compatible with the version of Windows that you are using. Click "Start" and "Run," to manually remove the programs if the uninstall option does not completely uninstall the program. Type "Regedt32" in the box and click "OK." Locate the "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall" registry key and click "Export" under the "File" tab. Click "Desktop" on the "Export Registry File" dialog box. Type "Uninstall" in the "File Name" box and select "Save." The left panel of the Registry Editor will display the programs that are currently installed. Right-click the key in the left panel of the Registry Editor window. Click "Delete." Click "Yes" when you are asked to confirm deletion of the program. Click the "File" menu and select "Exit." This will exit the Registry Editor. Click "Start" and "Control Panel" and click "Add or Remove Programs." Confirm that the program is no longer listed here. Hope this helps.

Jan 11, 2013 | Operating Systems

1 Answer

How to delete babylon that overrules firefox?


You can uninstall it like this:

You can uninstall a program from your computer if you no longer use it or if you want to free up space on your hard disk. You can use Programs and Features to uninstall programs or to change the program's configuration by adding or removing certain options.

  1. Open Programs and Features by clicking the Start button 4f6cbd09-148c-4dd8-b1f2-48f232a2fd33.png, clicking Control Panel, clicking Programs, and then clicking Programs and Features.

  2. Select a program, and then click Uninstall. Some programs include the option to change or repair the program in addition to uninstalling it. but many simply offer the option to uninstall. To change a program, click Change or Repair. 18abb370-ac1e-4b6b-b663-e028a75bf05b.png If you are prompted for an administrator password or confirmation, type the password or provide confirmation.

Mar 06, 2011 | Microsoft Operating Systems

2 Answers

What is the difference between a software and a program? Describe.


A program is a set of instructions written in a programming language to perform a particular function. Many programs combine together to form software. While software refers to a collection of several programs and other procedures and documentation.

Software is also used to perform a task. The most common programming language used for making software is C and C++. Software is of two types that is system software which is the operating system and application software.

So a program is a set of instructions for performing a task whereas a software is made up of several computer programs.

Feb 06, 2011 | Operating Systems

1 Answer

How to solve the problem"*.exe


This error is generally an indication that the written program isn't designed to be run in the 32 bit windows environment, the program is corrupted, or an error occured while trying to run the program. It is generally due to an older program being run within windows.

The newer windows versions are mostly 32 bit platforms. Some of the old programs from windows 95 and 98 eras won't work because they are 16 bit programs. Examples may include older programs with a .com extension (which will bring up this error message), or old versions of .exe's written for 16 bit environments.

If the program you are attempting to run is a recent program (came with your version of windows XP or later) then it could be an error at execution or the program is corrupted. If the program is written by a major brand and is relatively new, contact the program's technical support number for help.

If you suspect a program error, try and obtain another copy of the program. Uninstall the current copy of the program, restart your computer, then install a fresh copy. If the error continues after doing this, then contact the program manufacturer's technical support number.

If the program you are using is one of the programs from within windows, (from the system 32 folder for example, and include notepad.exe, msconfig.exe, or other programs that can be selected and run from within this folder) do NOT remove or copy over the program. Some of the programs within the windows sub-directories are older 16bit programs, not designed to run within the 32bit platform. It is recommended to NOT remove any of these programs from the windows sub directories.

Jan 12, 2011 | Operating Systems

1 Answer

IS NOT CAMPATIBLE WITH WIN 7


Run the Program Compatibility Wizard
  1. Open the Program Compatibility Wizard by clicking the Start button 4f6cbd09-148c-4dd8-b1f2-48f232a2fd33.png, clicking Control Panel, clicking Programs, and then clicking Use an older program with this version of Windows.

  2. Follow the instructions in the wizard.

If you cannot install a program, insert the installation disc for the program and, using the wizard, browse to the program's setup file, usually called Setup.exe, Install.exe, or something similar. The wizard is not designed to work on programs that have an .msi file name extension.

To change compatibility settings manually for a program, right-click the icon for the program, click Properties, and then click the Compatibility tab.

Setting

Description

Compatibility mode

Runs the program using settings from a previous version of Windows. Try this setting if you know the program is designed for (or worked in) a specific previous version of Windows.

Run in 256 colors

Uses a limited set of colors in the program. Some older programs are designed to use fewer colors.

Run in 640 × 480 screen resolution

Runs the program in a smaller-sized window. Try this setting if the graphical user interface appears jagged or is rendered improperly.

Disable visual themes

Disables themes on the program. Try this setting if you notice problems with the menus or buttons on the title bar of the program.

Disable desktop composition

Turns off transparency and other advanced display features. Choose this setting if window movement appears erratic or you notice other display problems.

Disable display scaling on high DPI settings

Turns off automatic resizing of programs if large-scale font size is in use. Try this setting if large-scale fonts are interfering with the appearance of the program. For more information, see Make the text on your screen larger or smaller and Ways to improve display quality.

Privilege level

Runs the program as an administrator. Some programs require administrator privileges to run properly. If you are not currently logged on as an administrator, this option is not available.

Show settings for all users

Lets you choose settings that will apply to all users on this computer.

Dec 27, 2010 | Operating Systems

1 Answer

I have a question the compatibility of a game called EVE. Is it compatible with XP Home Edition?


Getting older programs to run on Windows XP Your game should have compatibility info on the box or in the readme file on disc. Even if it was made to run on Win'98, you can change settings in WP so it will run.
Here are MS instructions to run a compatibility test:

To start the Program Compatibility Wizard, click Start, All Programs, Accessories, Program Compatibility Wizard.
You can also use this method:
You can set the compatibility properties for a program manually. The settings are the same as the options in the Program Compatibility Wizard.
To set the compatibility properties for a program manually
  1. Right-click the program icon on your desktop or the shortcut on the Start menu Or right click on the program Icon on your desktop.
  2. Click the Compatibility tab, and change the compatibility settings for your program.
note.gif Notes
  • The Compatibility tab is only available for programs installed on your hard drive. Although you can run the Program Compatibility Wizard on programs or setup files on a CD-ROM or floppy disk, your changes will not remain in effect after you close the program.

Nov 13, 2009 | Microsoft Windows XP Home Edition

1 Answer

Roxio Media Manager program installation will not complete. How do I uninstall.


Posted all operatings systems...
In Windows, how do I uninstall programs? Using the Add/Remove Programs control panel The Add/Remove Programs control panel in Windows makes it easier to uninstall programs. Follow the appropriate instructions below to use this control panel.
Windows 7
  1. From the Start menu, select Control Panel.

  2. In Large or Small icon view, click Programs and Features. If you're using Category view, under "Programs", click Uninstall a program.

  3. Select the program you want to remove, and click Uninstall. Alternatively, right-click the program and select Uninstall.
Windows Vista
  1. From the Start menu, select Control Panel.

  2. In Classic View, double-click Programs and Features. If using the Control Panel Home view, under "Programs", click Uninstall a program.

  3. Select the program you want to remove, and click Uninstall. Alternatively, right-click the program and select Uninstall.
Windows XP in the default XP view
  1. From the Start Menu, select Control Panel.

  2. Click the Add or Remove Programs icon.

  3. Select the program you wish to remove and click Remove.
Windows XP in Classic View and 2000
  1. From the Start menu, select Settings, and then Control Panel.

  2. Double-click the Add/Remove Programs icon.

  3. Select the program you wish to remove and click Add/Remove.
Using the Uninstall program from the Start menu If the program you wish to uninstall is not listed among the installed programs, an uninstall program for that item might be available on the Start menu. To look for such an option:
  1. From the Start menu, select Programs or All Programs.

  2. Find the folder for the program you wish to uninstall and highlight it.

  3. In many cases, on the menu that appears, you will see an uninstall option.

Please let me know how this works out for you...
Thank you
Jon

Aug 12, 2009 | Operating Systems

1 Answer

"trying to set AOL as default email program when sending photos" via windows photo gallery using Vista


you can set aol as the default email program by pressing start / then all programs or program / then you should see program access and defaults, use the program to set your email program settings all into aol. if you wish.

Jun 03, 2009 | Microsoft Windows Vista Home Basic for PC

Not finding what you are looking for?
Operating Systems Logo

Related Topics:

140 people viewed this question

Ask a Question

Usually answered in minutes!

Top Operating Systems Experts

Les Dickinson
Les Dickinson

Level 3 Expert

18304 Answers

Brian Sullivan
Brian Sullivan

Level 3 Expert

27725 Answers

Prashant  Sharma
Prashant Sharma

Level 3 Expert

1127 Answers

Are you an Operating System Expert? Answer questions, earn points and help others

Answer questions

Manuals & User Guides

Loading...