Top baner Big

Your Ad Here

Top Banner

Your Ad Here

Saturday, November 29, 2008

AnyDVD & AnyDVD HD 6.4.8.8 Beta





AnyDVD is a driver, which descrambles DVD-Movies automatically in the background. This DVD appears unprotected and region code free for all applications and the Windows operating system as well. With AnyDVD's help copy tools like CloneDVD, Pinnacle Instant Copy, InterVideo DVD-Copy, etc. are able to copy CSS protected Movies. You can remove the RPC region code, thereby making the movie region free and viewable on any DVD player and with any DVD player software. With the help of AnyDVD you can watch movies with non matching region codes with every DVD Player Software you like!
AnyDVD is capable of removing unwanted movie features, including subtitles and prohibition messages such as copyright and FBI warnings. It also allows you to launch an external application whenever you insert or remove a disc, or prevent 'PC-friendly'software from automatically launching when you insert a video DVD. AnyDVD decrypts not just DVDs: AnyDVD allows you also to play, copy and rip protected Audio CDs!
Download : AnyDVD & AnyDVD HD 6.4.8.8 Beta

Intel Chipset Software Installation Utility 9.1.0.1007





The Intel(R) Chipset Software Installation Utility installs Windows INF files to the target system. The INF files inform the operating system how to properly configure the chipset for specific functionality, such as AGP, USB, Core PCI, and ISAPNP services.
This software can be installed in three modes: Interactive, Silent and Unattended Preload. Interactive Mode requires user input during installation; Silent Mode and Unattended Preload do not. This software also offers a set of command line flags, which provide additional installation choices. The command line flags are not case sensitive.

Download : Intel Chipset Software Installation Utility 9.1.0.1007

AnyDVD & AnyDVD HD 6.4.8.7 Beta





AnyDVD is a driver, which descrambles DVD-Movies automatically in the background. This DVD appears unprotected and region code free for all applications and the Windows operating system as well. With AnyDVD's help copy tools like CloneDVD, Pinnacle Instant Copy, InterVideo DVD-Copy, etc. are able to copy CSS protected Movies. You can remove the RPC region code, thereby making the movie region free and viewable on any DVD player and with any DVD player software. With the help of AnyDVD you can watch movies with non matching region codes with every DVD Player Software you like!
AnyDVD is capable of removing unwanted movie features, including subtitles and prohibition messages such as copyright and FBI warnings. It also allows you to launch an external application whenever you insert or remove a disc, or prevent 'PC-friendly'software from automatically launching when you insert a video DVD. AnyDVD decrypts not just DVDs: AnyDVD allows you also to play, copy and rip protected Audio CDs!
Decryption is not all that AnyDVD offers. You can control the drive speed of your DVD drive, allowing you to reduce the noise level when watching movies on your PC. You can even adjust the display frequency of your monitor for both NTSC and PAL displays.



Changes in version 6.4.8.7, 2008 11 27:
- New (DVD): Added support for new protections
- Change (Blu-ray): AnyDVD will disable itself, if BD+ can't be removed
- Fix (Blu-ray & HD-DVD): Bug reading unencrypted files from encrypted BD / HD DVD discs
- Some minor fixes and improvements
- Updated languages

Download : AnyDVD & AnyDVD HD 6.4.8.7 Beta

Paragon Hard Disk Manager 2009 Pro *Retail*





All the necessary tools you need to manage and maintain your hard drive in one advanced toolset! The professional edition manages your system hard drive(s) through every stage of its lifecycle: from placing a new drive into service, setting up real and secured dual boot environment, advanced partitioning without data loss, regular backups of system and data, solving any boot problems, restoring your system from bare metal state and much more.

Download : Paragon Hard Disk Manager 2009 Pro *Retail* Part1 | Part 2
Download Mirror : Part 1 | Part 2

Trillian Pro v3.1.12.0 + Crack





Trillian Pro is a very powerful communications tool that includes a huge number of features to enhance your IM experience, creating infinite possibilities during your journey on the Internet. Whether you're a user tangled by the complexity of using more than one network, a user who is using only one messenger looking for a better experience, or an Internet user looking for an efficient way to stay updated with the world, Trillian Pro is designed for you.


Install Notes:

Install trillian-v3.1.12.0.exe. After installation copy precracked exe from the Crack folder to the installed folder of Trillian Pro, making sure to overwrite the existing file. Launch Trillian Pro and select Pro and use any Name and Password for membership. Setup your other IM accounts afterwards. You now how a fully registered verison of Trillian Pro!

Download : Trillian Pro v3.1.12.0 Incl Crack | Mirror | Mirror

DVDFab Platinum 5.1.2.0 Final





DVDFab Platinum is the most powerful and flexible DVD copying/burning software. With 8 copy modes, you can back up any DVD to DVDR in just a few clicks. DVDFab Platinum is brand new, is completely rewritten, is based on more than 6 years of DVD copy software development.
DVDFab is simply the easiest way to copy a DVD movie. Just insert the movie and a blank DVD then press Start. Your entire movie - including menus, trailers and special features - is copied to a single DVD with just one click, and everything happens automatically. Backup your entire DVD - including menus, trailers, and special features - onto one or multiple discs.



Changes in DVDFab DVDFab 5.1.2.0 (November 28, 2008):
* New: Improved transcoding speed of "DVD to DVD" mode.
* New: Profile can be changed in "Tast List" window now. (DVDFab Mobile Option)
* New: Improved selection of recommended write speed. DVDFab will use 16x when writer recommends 18x or 20x, and will use 8x when writer recommends 12x or 16x. If you want to use highest possible write speed, you can specify it in "Write Speed" of "Settings -> DVD -> Write" window.
* New: Updated VSO burning engine.
* New: Added support for "AUTO" and "MAX" write speed of ImgBurn.
* New: Updated language files.
* New: Some minor improvements.
* Fix: A crash problem when copying "Wall-E" (US).
* Fix: A problem for "Clone" of "Wall-E" (US).
* Fix: UOPs protection is not removed completely when using "Main Movie" mode.

Download : DVDFab Platinum 5.1.2.0 Final

Norton AntiVirus 2009 16.1.0.33






Symantec's Norton AntiVirus 2009 - Winning protection against viruses, spyware, and other malicious threats! Heuristically detects Spyware threats, detects blocks Internet worm attacks, and protects email.
Norton AntiVirus blocks viruses and spyware with advanced protection. It helps protect your entire computer by stopping viruses, spyware, and other security risks. Norton AntiVirus works in the background so you can surf the Internet, read the news, play games, and download software or music without disruption. It also scans and cleans all email and instant messaging (IM) attachments, preventing you from receiving viruses, or spreading them to others. With set-it and forget-it functionality, Norton AntiVirus checks for updates continuously and automatically blocks new and emerging threats from getting on your system. In addition to protection updates, Norton AntiVirus provides new product features as available throughout your service subscription.

Download : Norton AntiVirus 2009 16.1.0.33

Norton Internet Security 2009 16.1.0.33





Norton Internet Security 2009 - Strong on protection, light on system resources, award winning! Stay protected from the latest online threats. Norton Internet Security runs quietly in the background to detect and block today's complex threats and to protect your identity when you buy, bank, or browse online. The friendly and efficient product design helps minimize confusing security alerts and system slowdowns that can get in the way of your online experience.

Norton Internet Security™ provides essential protection from viruses, hackers, spyware, spam and other privacy threats. A comprehensive set of security tools, Norton Internet Security helps keep you safe online as you surf and email, swap files, download programs, and chat. In addition to protecting against viruses and unwelcome intrusions from the Internet, NIS also allows you to automatically block annoying banner ads and pop-up windows, set up parental site blocking options for restricting access to specific Web sites, and selectively determine which, if any, Java applets and ActiveX controls should be allowed to download and execute on your computer. Enjoy the Internet with award-winning protection!

Download : Norton Internet Security 2009 16.1.0.33

Download Accelerator Plus 9.0.0.2 Beta





Download Accelerator Plus (DAP) is the world's leading download manager, allows you to download up to 300% faster* with increased reliability, resume support and errors recovery. It searches for mirror sites that most effectively serve your downloads through multiserver connections for optimal utilization of dial-up or broadband connections. DAP automatically recovers from shutdowns, lost connections, and other errors. It is fully integrated into Netscape, Internet Explorer, and Opera, Mozilla/Firefox and offers a toolbar for Internet Explorer with a links catcher and a highlighter, providing the best possible performance from ANY Internet connection (dial-up, cable, DSL / ADSL, T1 etc.), allowing a Faster and more Reliable download experience. It features auto-hang-up after downloading, proxy settings, scheduling, and a unique AlwaysResume service.

Download : Download Accelerator Plus 9.0.0.2 Beta

AVG Anti-Virus 8.0.200 Build 1399






Get complete protection from the most dangerous threats on the internet - worms, viruses, trojans, spyware, and adware.
Antivirus and antispyware protection for Windows from the world's most trusted security company. Use the Internet with confidence in your home or small office.

* Easy to download, install and use
* Protection against viruses, spyware, adware, worms and trojans
* Real-time security while you surf and chat online
* Top-quality protection that does not slow your system down
* Free support and service around the clock and across the globe
* Compatible with Windows Vista and Windows XP

Download : AVG Anti-Virus 8.0.200 Build 1399
Download : AVG Anti-Virus with firewall 8.0.200 Build 1399

AVG Internet Security 8.0.200 Build 1399





Anti-Virus, Anti-Spyware, Anti-Spam, LinkScanner & Firewall
Comprehensive protection for your computer! This award-winning product gives you unbeatable Internet security by protecting against viruses, spyware, hackers, spam and malicious websites. AVG Internet Security is a reliable and easy-to-use solution for home and small office users which is trusted by millions of users worldwide.
Unique Internet security thanks to new technology - Only AVG gives you real-time protection against malicious websites thanks to our new LinkScanner technology.

Comprehensive protection for Windows against all online threats from the world's most trusted security company. Use the Internet with confidence in your home or small office.

* Easy to download, install and use
* Protection against all Internet threats
* Real-time security while you surf and chat online
* Top-quality protection that does not slow your system down
* Free support and service around the clock and across the globe
* Compatible with Windows Vista and Windows XP

Download : AVG Internet Security 8.0.200 Build 1399

FireFox 3.1 Beta 3








Firefox is a free, open-source web browser for Windows, Linux and MacOS X and is based on the Mozilla codebase. It is small, fast and easy to use, and offers many advantages over Internet Explorer, such as the ability to block pop-up windows.

Download : FireFox 3.1 beta 3 pre for Windows
Download : FireFox 3.1 beta 3 pre for Mac
Download : FireFox 3.1 beta 3 pre for Linux

TuneUp Utilities 2009 v8.0.1210





Optimize Windows With TuneUp Utilities 2009!

TuneUp Utilities makes Windows faster, more secure, and comfortable. All important aspects of system configuration, security, cleaning and maintenance are combined under a modern graphical user interface.

Download : TuneUp Utilities 2009 v8.0.1210

ICQ 6.5 Build 102






ICQ is a program that lets you find your friends and associates online in real time. You can create a Contact List containing only people you want to have there, you can send them messages, chat with them, send files, configure ICQ to work with external applications and more.

Download : ICQ 6.5 Build 102

Trillian Pro 3.1.12.0






Trillian is a multi-network chat client that currently supports IRC, AIM, ICQ, MSN, and Yahoo! Messenger. It supports all of the features you've come to expect from a good IM client, including but not limited to docking, multi-line edit boxes, buddy alerts, multiple connections to the same medium, a powerful skinning language, easy importing of your existing contacts, skinnable emoticons, logging, "global" away/invisible features, and a unified contact list. It is completely free with no nag screens or built-in ads.


Download : Trillian Pro 3.1.12.0

CSI - New York *Ripped*







Analyze the evidence. Solve the crimes. Step into the shoes of detectives Mac Taylor and Stella Bonasera and enter the gritty world of the smash-hit TV show CSI:NY. Test your investigative knowledge in unsolved crime scenes created exclusively by the show's writers. Use real-life crime solving techniques such as evidence analysis and interrogation to confirm suspect's alibis or prove their guilt. Perfect your skills in an array of hi-tech mini-tames including code breaking facial reconstruction and many more. Features exclusive behind the scenes footage with the cast of CSI:NY!

Ripped: Nothing (Movies are downsampled)

Download : CSI_New_York-BACKLASH Part 1 | Part 2 | Part 3

RS Mirror : Part 1 | Part 2 | Part 3

Vista Codec Package 5.03 Final



Codecs have been a problem for most users at one time or another. This is because there has never been an 'out of the box' working solution that the average computer user could install and just have everything work properly from the beginning. There are several decent codec package solutions out there, but none of them did everything I wanted. I was always in need of a tweak, adjustment, or even a re-installation just to get the codecs I needed/wanted and most of the time, the file still didn't play properly. I've never claimed to be a media guru. My media experience prior to creating these packages was to doubleclick a file I downloaded and hope that it played. So with the help of the MSFN community, I decided to package up the bare minimum of codecs required by most computer users and share them with the rest of the world.

The installer will automatically remove most other popular codec releases from your computer before installing this concise yet comprehensive package. You won't need to make any adjustments or tweaks to enjoy your media content immediately. Windows Media Player and Vista's Media Center will instantly recognize all your files as playable.

It does not contain a media player and it does not associate filetypes. With this package installed you will be able to use any media player, limited only by the players' capabilities, to play all movies and video clips. Streaming video is supported in several formats in all popular web browsers. Users of VCP have the ability to choose what is installed and where to install it using the public redistributable. After installation you can select to remove specific portions without removing the entire package. You can also re-add the removed items at any time.

Changelog:
- update ffdshow rev 2364
- update Gabest filters rev 901
- minor revisions

Download : Vista Codec Package 5.03 Final | Mirror

K-Lite Mega Codec Pack 4.3.4





K-Lite Codec Pack is a collection of codecs, DirectShow filters and tools. Codecs and DirectShow filters are needed for encoding and decoding (playing) audio and video formats. The K-Lite Codec Pack is designed as a user-friendly solution for playing all your movie files. With the K-Lite Codec Pack you should be able to play all the popular audio and video formats and even some rare formats.
The K-Lite Codec Pack always very up-to-date with the newest (and/or best) versions of the components. The installation is fully customizable, meaning that you are able install exactly those components that you really want. Uninstallation removes all files and registry entries created by the pack. It is extremely easy to make a fully customized unattended installation. It tries to avoid potential problems with existing codecs and even fixes some problems. The pack is able to detect broken codecs and filters on your system, and remove them for you. It is a very complete package, containing everything you need to play your movies. Suitable for both novice and expert users. The K-Lite Codec Pack works on Windows 2000/XP/2003/XP64/Vista.



Changes K-Lite Mega Codec Pack 4.3.4 | (2008-11-26):
- Updated Media Player Classic to version 6.4.9.1 rev. 86
- Updated Media Player Classic Homecinema to version 1.1.904
- Updated ffdshow to revision 2364
- Updated FLV splitter. Seeking now also works on files with broken metadata
- Updated x264VFW to revision 1032
- Updated GraphStudio to version 0.3.0.0
- Minor changes

Download : K-Lite Mega Codec Pack 4.3.4 | Mirror

cFosSpeed 4.25 Build 1448 Beta



cFosSpeed is a high-performance network driver for DSL modems and routers. Highlights of this program include Traffic Shaping, For DSL modems and routers, Fully compatible with conventional PPPoE drivers, Automatic router detection, Self-calibrating, Highly responsive when used with online games and Peer-to-Peer networks like eMule or Kazaa, and Freely configurable priority classes.

Download : cFosSpeed 4.25 Build 1448 Beta

Yamicsoft Vista Manager v2.0.0 + KeyGen



Vista Manager is a system utility that helps you optimize, tweak, and clean up Windows Vista. It will increase your system speed, improve system security, and meet all of your expectations. It's compatible with Windows Vista SP1 entirely!

Windows Vista is the new Operating System for home users and professionals alike. Windows Vista brings clarity to your world, so you can more safely and easily accomplish everyday tasks and instantly find what you want on your PC.

Vista Manager is the powerful software tool to tweak and optimize your Windows Vista, it bundles more than 30 different utilities in one and help your system faster and more stable, secure and personal!

Download : Yamicsoft Vista Manager v2.0.0 + KeyGen | Mirror

Download : Yamicsoft Vista Manager v2.0.0 (x64) + KeyGen | Mirror

System Mechanic Professional v8.5.0.11





Whether you are looking to find and fix stubborn computer errors; clean-up, compact, and defragment your registry; defragment your hard drive and memory; speed-up Windows and the Internet; protect your e-mail and computer from viruses, worms, spyware, and hackers; secure your PC; or perform a variety of critical system maintenance tasks; the award-winning System Mechanic Product Family has the right tools for the job.

Download : System Mechanic Professional v8.5.0.11 | Mirror | Mirror
Download : System Mechanic Standard v8.5.0.11 | MIrror | Mirror

Safari 3.2.1



Experience the web, Apple style, with Safari: the fastest, easiest-to-use web browser in the world. With its simple, elegant interface, Safari gets out of your way and lets you enjoy the web - up to 2 times faster than Internet Explorer. Safari's clean, sleek look lets you focus on the web instead of your browser. The browser frame is a mere one pixel wide. You see a scroll bar only when you need one. You see no status bar by default a blue progress bar fills the address field as the page loads giving you more room to browse and view the web.

And with commonly used tools like a Google search field built right into Safari, you can get anywhere on the web faster.

Tabbed browsing, pop-up blocker and more are all fully implemented and supported.

Download : Safari 3.2.1

Fedora 10 Final



Fedora Core is intended to be a logical upgrade path for previous users of Red Hat Linux whose needs are consistent with the objectives of the Fedora Project. It is a return to Red Hat's roots; 2-3 releases per year, and freely-available downloads that can be called by name even when media containing those bits are sold by third parties (within the constraints of trademark guidelines).

BT Download : Fedora 10 Final

Orbit Downloader 2.7.9



Orbit is a download accelerator and manager based on P2P techonology. And it has advanced robust multithread download algorithm implemented with high quality.
Orbit integrates seamlessly into Microsoft Internet Explorer to automatically handle your downloads. Using Orbit you can easily download files from any remote server via HTTP, FTP, RTSP, MMS. With Orbit the downloading process will be as easy as nerver before. Orbit is a light-weight, powerful and easy-to-use application. Also it is well-known for its intuitive and user-friendly interface.

Download : Orbit Downloader 2.7.9

Google Chrome 0.4.154.25 Beta





Google Chrome is a browser that combines a minimal design with sophisticated technology to make the web faster, safer, and easier. It has one box for everything: Type in the address bar and get suggestions for both search and web pages. Will give you thumbnails of your top sites; Access your favorite pages instantly with lightning speed from any new tab. Google Chrome is an open source web browser developed by Google. Its software architecture was engineered from scratch (using components from other open source software including WebKit and Mozilla Firefox) to cater for the changing needs of users and acknowledging that today most web sites aren't web pages but web applications. Design goals include stability, speed, security and a clean, simple and efficient user interface.

Download : Google Chrome 0.4.154.25 Beta

Tor 0.2.0.32



Tor is a software project that helps you defend against traffic analysis, a form of network surveillance that threatens personal freedom and privacy, confidential business activities and relationships, and state security. Tor protects you by bouncing your communications around a distributed network of relays run by volunteers all around the world: it prevents somebody watching your Internet connection from learning what sites you visit, and it prevents the sites you visit from learning your physical location. Tor works with many of your existing applications, including web browsers, instant messaging clients, remote login, and other applications based on the TCP protocol.

Download : Tor 0.2.0.32

Internet Download Manager 5.15 Build 2



Internet Download Manager (IDM) is a tool to increase download speeds by up to 500 percent, resume and schedule downloads. IDM has a smart download logic accelerator that features intelligent dynamic file segmentation and safe multipart downloading technology to accelerate your downloads. Simple graphic user interface makes IDM user friendly and easy to use.

Download : Internet Download Manager 5.15 Build 2

Acronis True Image Home 2009 12 Build 9646



Complete file and system disk imaging backup and restore for home and home office users that can protect your entire system and family pictures, videos, music, and important documents stored on your home PC. Acronis announces the release of Acronis True Image 9.0. With this new release you get two backup products in one and then some!

Download : Acronis True Image Home 2009 12 Build 9646

Symantec AntiVirus Corporate Edition 10.1.8.8000 Retail





Symantec AntiVirus combines industry-leading, real-time malware protection for desktops and servers with graphical web-based reporting, centralized management and administration capabilities.

Download : Symantec AntiVirus Corporate Edition 10.1.8.8000 Retail For XP (CD1) | CD2

Vista Manager 2.0.0



Vista Manager is a system utility that helps you to optimize and tweak, clean up your Windows Vista. It will increase you system speed, improve system security and suit your idea.
Download : Vista Manager 2.0.0

CyberLink PowerCinema 6.0.1309 + KeyGen





CyberLink PowerCinema 6 - The TV Entertainment Center for the Digital Home
Cyberlink PowerCinema - Watch, play, listen, enjoy and surf.
With PowerCinema (choose from hybrid or analog tuner card) you can do it all via remote control!

* Watch analog and digital TV programs with time-shift playback
* Record your favorite TV and radio shows with smart scheduling
* Search for TV programs that match your interests via EPG
* Watch two channels simultaneously using PiP mode
* Play DVDs, videos, photos, and music. Get online news and weather info
Download : CyberLink PowerCinema 6.0.1309 | Keygen Only

Saturday, November 22, 2008

Taylors Series for Sin, Cos and Exponential


/*Program :Taylors Series for Sin, Cos and Exponential
Programmer ::fizmhd(MEA) www.mdown.co.cc*/

#include
#include
#define PI 3.1415

float exp_x(int,int);
double sin_x(int,int);
double cos_x(int,int);
int fact(int);

int main()
{
int choice,x,n;
do
{
printf("\nMenu\n[1] e^x)\n[2] Sin(x)\n[3] Cos(x)\n[4] Exit\n");
scanf("%d",&choice);
switch(choice)
{
case 1: // to find exponential value
printf("e^x\nEnter x and n:\t");
scanf("%d %d",&x,&n);
printf("e^%d(%d) = %f\n",x,n,exp_x(x,n));
break;
case 2: // to find sinx
printf("sin(x)\nEnter x and n:\t");
scanf("%d %d",&x,&n);
printf("\ncos(%d)(%d) = %f\n",x,n,sin_x(x,n));
break;
case 3: // to find cosx
printf("cos(x)\nEnter x and n:\t");
scanf("%d %d",&x,&n);
printf("\ncos(%d)(%d) = %f\n",x,n,cos_x(x,n));
break;
case 4: // exit
break;
default:// wrong choice
printf("Wrong choice");
break;
}
}while(choice!=4);
}

float exp_x(int x,int n)
{
int i=1;
float ex=1;
while(i{
ex+=(float)pow(x,i)/fact(i);
++i;
}
return ex;
}

double sin_x(int ang_deg,int no_of_terms)
{
int term,j;
double value=0.0,ang_rad=0.0;
ang_rad=(double)ang_deg*PI/180;
for(term=1,j=2;term{
value+=(double)pow(-1.0,j)*pow(ang_rad,term)/fact(term);
}
return value;
}

double cos_x(int ang_deg,int no_of_terms)
{
int term,j;
double value=1.0,ang_rad=0.0;
ang_rad=(double)ang_deg*PI/180;
for(term=2,j=1;term<=no_of_terms;term+=2,j++)
{
value+=(double)pow(-1.0,j)*pow(ang_rad,term)/fact(term);
}
return value;
}

int fact(int num)
{
int f=0;
if(num==1)
return 1;
else
f=num*fact(num-1);
return f;
}

Sum of 10 numbers

/*Program : Sum of 10 numbers
Programmer ::fizmhd(MEA) www.mdown.co.cc*/

#include

int main()
{
int sum=1,b=2;
while(b<=10)
{
sum=sum+b;
b=b+1;
}
printf("sum=%d\n",sum);
}

implementation of stack using array

/*Program : implementation of stack using array
Programmer ::fizmhd(MEA) www.mdown.co.cc*/

#include
void push(int);
int pop(void);
void display(void);

int main()
{
int choice=0,val=0;
do
{
printf("\n\t1.Push 2.Pop 3.Display 4.Exit\n\tSelect Your Choice : ");
scanf("%d",&choice);
switch(choice)
{
case 1:
printf("\tElement to be Pushed : ");
scanf("%d",&val);
push(val);
break;
case 2:
val=pop();
if(val!=-1)
printf("\tPopped Element : %d\n",val);
break;
case 3:
display();
break;
case 4:
break;
default:
printf("\tWrong Choice");
break;
}
}while(choice!=4);
return 0;
}
#define maxsize 100
int stack[maxsize];
int stacktop=0;

void push(int val)
{
if(stacktopstack[stacktop++]=val;
else
printf("Stack Overflow");
}

int pop()
{
int a;
if(stacktop>0)
{
stacktop--;
a=stack[stacktop];

return a;
}
else
{
printf("Stack is Empty");
return -1;
}
}

void display()
{
int i=0;
if(stacktop>0)
{
printf("\tElements are:");
while(i{
printf("\t%d",stack[i++]);
}
printf("\n");
}

else
printf("\tStack is Empty\n");
}

Square of numbers

/*Program : Square of numbers
Programmer ::fizmhd(MEA) www.mdown.co.cc*/

#include

int main()
{
int lower,higher;
printf("Enter lower range\n");
scanf("%d",&lower);
printf("Enter higher range\n");
scanf("%d",&higher);
while(lower<=higher)
{
printf("square of %d is %d\n",lower,lower*lower);
++lower;
}
}

queue operations using linked list

/*Program : queue operations using linked list
Programmer ::fizmhd(MEA) www.mdown.co.cc*/

#include
#include
#define MAXSIZE 10

void insertion();
void deletion();
void display();

struct node
{
int info;
struct node *link;
}*new,*temp,*p,*front=NULL,*rear=NULL;
typedef struct node N;


main()
{
int ch;
do
{
printf("\n\t\t\tLinked queue");
printf("\n 1.Insertion");
printf("\n 2.Deletion");
printf("\n 3.Display");
printf("\n 4.Exit");
printf("\n Enter your choice : ");
scanf("%d",&ch);
switch(ch)
{
case 1:
insertion();
break;
case 2:
deletion();
break;
case 3:
display();
break;
default:
break;
}
}
while(ch<=3); } void insertion() { int item; new=(N*)malloc(sizeof(N)); printf("\nEnter the item : "); scanf("%d",&item); new->info=item;
new->link=NULL;
if(front==NULL)
front=new;
else
rear->link=new;
rear=new;
}

void deletion()
{
if(front==NULL)
printf("\nQueue is empty");
else
{
p=front;
printf("\nDeleted element is : %d",p->info);
front=front->link;
free(p);
}
}

void display()
{
if(front==NULL)
printf("\nQueue is empty");
else
{
printf("\nThe elements are : ");
temp=front;
while(temp!=NULL)
{
printf("%d",temp->info);
temp=temp->link;
}
}
}

Program to find a number prime or not

/*Program :Program to find a number prime or not
Programmer ::fizmhd(MEA) www.mdown.co.cc*/

#include

int prime_or_not(int);

int main()
{
int number,re;
printf("Enter the number : ");
scanf("%d",&number);
re=prime_or_not(number);
if(re==1)
printf("%d is not Prime\n",number);
else if(re==0)
printf("%d is Prime\n",number);
else
printf("It is neither prime nor composite\n");
}

int prime_or_not(int num)
{
int i;
if(num==0)
return 1;
if(num==1)
return -1;
for(i=2;ilt;=num/2;i++)
{
if(num%i==0)
return 1;
}
return 0;
}

odd or even

/*Program : odd or even
Programmer ::fizmhd(MEA) www.mdown.co.cc*/

#include

int main ()
{
int num1,num2,result;
num1=10;
num2=2;
result= num1%num2;
if (result==0)
printf("odd\n");
else
printf("even\n");
}
/*Program : odd or even
Programmer ::fizmhd(MEA) www.mdown.co.cc*/

#include

int main ()
{
int num1,num2,result;
num1=10;
num2=2;
result= num1%num2;
if (result==0)
printf("odd\n");
else
printf("even\n");
}

Program to find Mean,Median,and Mode

/*Program : Program to find Mean,Median,and Mode
Programmer ::fizmhd(MEA) www.mdown.co.cc*/

#define SIZE 100
#include
float mean_function(float[],int);
float median_function(float[],int);
float mode_function(float[],int);
int main()
{
int i,n,choice;
float array[SIZE],mean,median,mode;
printf("Enter No of Elements\n");
scanf("%d",&n);
printf("Enter Elements\n");
for(i=0;iscanf("%f",&array[i]);
do
{
printf("\n\tEnter Choice\n\t1.Mean\n\t2.Median\n\t3.Mode\n4.Exit");
scanf("%d",&choice);
switch(choice)
{
case 1: mean=mean_function(array,n);
printf("\n\tMean = %f\n",mean);
break;
case 2: median=median_function(array,n);
printf("\n\tMedian = %f\n",median);
break;
case 3: mode=mode_function(array,n);
printf("\n\tMode = %f\n",mode);
break;
case 4: break;
default:printf("Wrong Option");
break;
}
}while(choice!=4);
}

/***************************************************************
Function Name : mean_function
Purpose : to find mean
Input : array of elements,no of elements
Return Value : Mean
Return Type : Float
****************************************************************/
float mean_function(float array[],int n)
{
int i;
float sum=0;
for(i=0;isum=sum+array[i];
return (sum/n);
}

/***************************************************************
Function Name : median_function
Purpose : to find median
Input : array of elements,no of elements
Return Value : Median
Return Type : Float
****************************************************************/

float median_function(float a[],int n)
{
float temp;
int i,j;
for(i=0;ifor(j=i+1;j{
if(a[i]>a[j])
{
temp=a[j];
a[j]=a[i];
a[i]=temp;
}
}
if(n%2==0)
return (a[n/2]+a[n/2-1])/2;
else
return a[n/2];
}

float mode_function(float a[],int n)
{
return (3*median_function(a,n)-2*mean_function(a,n));
}

No of lines....

/*Program : No of lines....
Programmer ::fizmhd(MEA) www.mdown.co.cc*/

#include
int main()
{
int c=0,line=0;
while (c!=-1)
{
c=getchar();
if (c=='\n')
line++;
}
printf("no of lines = %d\n",line);

}

Leap year 2

/*Program : Leap year 2
Programmer ::fizmhd(MEA) www.mdown.co.cc*/

#include
int main()
{
int year;
printf("enter year\t");
scanf("%d",&year);
if (((year%4==0) && (year%100!=0))||(year%400==0))
printf("Leap Year \n");
else
printf("Not a Leap Year \n");
}

Leap Year

/*Program : Leap Year
Programmer ::fizmhd(MEA) www.mdown.co.cc*/

#include

int main()
{
int year;
printf("\nEnter year\n");
scanf("%d",&year);
if(year%4==0)
{
if(year%100==0)
{
if(year%400==0)
printf("\nLeap Year\n");
else
printf("\nNot a Leap Year\n");
}
else
printf("\nLeap Year\n");
}
else
printf("Not a Leap Year");
}

Implentation of queue using arrays

/*Program : Implentation of queue using arrays
Programmer ::fizmhd(MEA) www.mdown.co.cc*/

# include
# define SIZE 10

int arr[SIZE], front = -1, rear = -1, i ;
void enqueue() ;
void dequeue() ;
void display() ;

int main()
{
int ch ;
do
{
printf("\n[1].ENQUEUE [2].DEQUEUE [3].Display [4].Exit\n") ;
printf("Enter your choice [1-4] : ") ;
scanf("%d", &ch) ;
switch(ch)
{
case 1 :
enqueue() ;
break ;
case 2 :
dequeue() ;
break ;
case 3 :
display() ;
break ;
case 4 :
break ;
default :
printf("Invalid option\n") ;
}
} while(ch != 4) ;
}

void enqueue()
{
if(rear == SIZE - 1)
{
printf("Queue is full (overflow)\n") ;
return ;
}
rear++ ;
printf("Enter the element to ENQUEUE : ") ;
scanf("%d", &arr[rear]) ;
if(front == -1)
front++ ;
}

void dequeue()
{
if(front == -1)
{
printf("Queue is empty (underflow)\n");
return ;
}
printf("The DEQUEUE element is : %d\n", arr[front]) ;
if(front == rear)
front = rear = -1 ;
else
front++ ;
}

void display()
{
if(front == -1)
{
printf("Queue is empty (underflow)\n") ;
return ;
}
printf("The elements in queue are : FRONT -> ") ;
for(i = front ; i <= rear ; i++)
printf(" ... %d", arr[i]) ;
printf(" ... <- REAR\n") ;
}

Implementation of stack using linked list

/*Program : Implementation of stack using linked list
Programmer ::fizmhd(MEA) www.mdown.co.cc*/

#include
#include

#define maxsize 10
void push();
void pop();
void display();

struct node
{
int info;
struct node *link;
}*start=NULL, *new,*temp,*p;
typedef struct node N;


main()
{
int ch,a;
do
{
printf("\t\t\tLinked stack");
printf("\n 1.Push");
printf("\n 2.Pop");
printf("\n 3.Display");
printf("\n 4.Exit");
printf("\n Enter your choice : ");
scanf("%d",&ch);
switch(ch)
{
case 1:
push();
break;
case 2:
pop();
break;
case 3:
display();
break;
case 4:
exit(0);
default:
printf("\nInvalid choice");
break;
}
}
while(ch<=3);
}

void push()
{
new=(N*)malloc(sizeof(N));
printf("\nEnter the item : ");
scanf("%d",&new->info);
new->link=NULL;
if(start==NULL)
start=new;
else
{
p=start;
while(p->link!=NULL)
p=p->link;
p->link=new;
}
}


void pop()
{
if(start==NULL)
printf("\nStack is empty");
else if(start->link==NULL)
{
printf("\nThe deleted element is : %d",start->info);
free(start);
start=NULL;
}

else
{
p=start;
while(p->link!=NULL)
{
temp=p;
p=p->link;
}
printf("\nDeleted element is : %d\n", p->info);
temp->link=NULL;
free(p);
}
}


void display()
{
if(start==NULL)
printf("\nStack is empty");
else
{

printf("\nThe elements are : ");
p=start;
while(p!=NULL)
{
printf("%d",p->info);
p=p->link;
}
printf("\n");
}
}

Program to find HCF and LCM

/*Program : Program to find HCF and LCM
Programmer ::fizmhd(MEA) www.mdown.co.cc*/

/***************************************************************
******* Program to find HCF and LCM *******
****************************************************************/

#define SIZE 100
#include
int hcf_function(int,int);
int lcm_function(int,int);
int main()
{
int array[SIZE],n,i,choice,lcm,hcf;
printf("Enter No of Elements\n");
scanf("%d",&n);
printf("Enter Elements\n");
for(i=0;iscanf("%d",&array[i]);
do
{
printf("\n\nEnter Choice\n\n1.HCF\n2.LCM\n3.Exit\n");
scanf("%d",&choice);
switch(choice)
{
case 1: hcf=array[0];
for(i=1;ihcf=hcf_function(hcf,array[i]);
printf("\nHCF = %d",hcf);
break;
case 2: lcm=array[0];
for(i=1;ilcm=lcm_function(lcm,array[i]);
printf("\nLCM = %d",lcm);
break;
case 3: break;
default:printf("Wrong Choice");
break;
}
}while(choice!=3);
}

/***************************************************************
Function Name : hcf_function
Purpose : to find hcf
Input : two numbers
Return Value : hcf
Return Type : int
****************************************************************/
int hcf_function(int m,int n)
{
int temp,reminder;
if(m{
temp=m;
m=n;
n=temp;
}
while(1)
{
reminder=m%n;
if(reminder==0)
return n;
else
m=n;
n=reminder;
}
}

/***************************************************************
Function Name : lcm_function
Purpose : to find lcm
Input : two numbers
Return Value : lcm
Return Type : int
****************************************************************/

int lcm_function(int m,int n)
{
int lcm;
lcm=m*n/hcf_function(m,n);
return lcm;
}

FLOYD WARSHALL'S ALGORITHM

/*Program : FLOYD WARSHALL'S ALGORITHM
Programmer ::fizmhd(MEA) www.mdown.co.cc*/



#include
#define inf 9999
int min(int a,int b);
main()
{
int i,j,n,k,a[20][20],p[20][20],t;
printf("ENTER THE NO. OF VERTICES ");
scanf("%d",&n);
printf("ENTER THE WEIGHTED ADJACENCY MATRIX");
for(i=1;i<=n;i++)
for(j=1;j<=n;j++)
scanf("%d",&a[i][j]);
for(i=1;i<=n;i++)
for(j=1;j<=n;j++)
{
if(a[i][j]==0)
p[i][j]=inf;
else
p[i][j]=a[i][j];
}
for(k=1;k<=n;k++)
{
for(i=1;i<=n;i++)
for(j=1;j<=n;j++)
{
t=p[i][k]+p[k][j];
p[i][j]=min(p[i][j],t);
}
}
printf("\nSHORTEST PATH IS\n");
for(i=1;i<=n;i++)
{
for(j=1;j<=n;j++)
{
if(p[i][j]==inf)
printf("- ");
else
printf("%d ",p[i][j]);
}
printf("\n");
}
}
int min(int a,int b)
{
if(areturn(a);
else
return(b);
}

Expression Tree

/*Program : Expression Tree
Programmer ::fizmhd(MEA) www.mdown.co.cc*/




#include

struct tree
{
char info;
struct tree *rchild;
struct tree *lchild;
};

int prec(char data);

typedef struct tree * node;

char pop_op();
node pop_num();
void push_op(char item);

node create()
{
return((node)malloc(sizeof(node)));
}
node num[20],root=NULL;
char op[20],oprt,ev[20];
int nt=-1,ot=-1,et=-1;


main()
{
node newnode,item,temp;
char str[50];
int i,k,p,s,flag=0;
printf("ENTER THE EXPRESSION ");
scanf("%s",str);
printf("\n%s",str);
for(i=0;str[i]!='\0';i++)
{
if(isalnum(str[i]))
{
newnode=create();
newnode->info=str[i];
newnode->lchild=NULL;
newnode->rchild=NULL;
item=newnode;
push_num(item);
}
else
{
if(ot!=-1)
p=prec(op[ot]);
else
p=0;
k=prec(str[i]);
if(k==5)
{
while(k!=1)
{
oprt=pop_op();
newnode=create();
newnode->info=oprt;
newnode->rchild=pop_num();
newnode->lchild=pop_num();
// if(root==NULL)
root=newnode;
// else if((newnode->rchild==root)||(newnode->lchild==root))
// root=newnode;
push_num(root);
k=prec(op[ot]);
}
oprt=pop_op();
}
else if(k==1)
push_op(str[i]);
else
{
if(k>p)
push_op(str[i]);
else
{
if(k<=p)
{
oprt=pop_op();
newnode=create();
newnode->rchild=pop_num();
newnode->lchild=pop_num();
if(root==NULL)
root=newnode;
else if((newnode->rchild==root)||(newnode->lchild==root))
root=newnode;
push_num(newnode);
push_op(str[i]);
// k=prec(op[ot]);
}
}
}
}
}
printf("\nThe prefix expression is\n ");
preorder(root);
printf("\nThe infix exp is\n ");
inorder(root);
printf("\nThe postfix expression is\n ");
postorder(root);
evaluate();
}
void push_op(char item)
{
op[++ot]=item;
}
push_num(node item)
{
num[++nt]=item;
}
char pop_op()
{
if(ot!=-1)
return(op[ot--]);
else
return(0);
}
node pop_num()
{
if(nt!=-1)
return(num[nt--]);
else
return(NULL);
}
int prec(char data)
{
switch(data)
{
case '(':return(1);
break;
case '+':
case '-':return(2);
break;
case '*':
case '/':return(3);
break;
case '^':return(4);
break;
case ')':return(5);
break;
}
}


inorder(node temp)
{
if(temp!=NULL)
{
inorder(temp->lchild);
printf("%c ",temp->info);
inorder(temp->rchild);
}
}

preorder(node temp)
{
if(temp!=NULL)
{
printf("%c ",temp->info);
preorder(temp->lchild);
preorder(temp->rchild);
}
}

postorder(node temp)
{
if(temp!=NULL)
{
postorder(temp->lchild);
postorder(temp->rchild);
printf("%c ",temp->info);
ev[++et]=temp->info;
}
}
evaluate()
{
int i,j=-1,a,b,ch[20];
for(i=0;ev[i]!='\0';i++)
{
if(isalnum(ev[i]))
ch[++j]=ev[i]-48;
else
{
b=ch[j];
a=ch[j-1];
switch(ev[i])
{
case '+':ch[--j]=a+b;
break;
case '-':ch[--j]=a-b;
break;
case '*':ch[--j]=a*b;
break;
case '/':ch[--j]=a/b;
break;
}
}
}
printf("\nValue = %d",ch[0]);
}

expression tree and perform the expression

/*Program : expression tree and perform the expression
Programmer ::fizmhd(MEA) www.mdown.co.cc*/

#include

void check(char);
void push(char);

struct node
{
char info;
struct node *r,*l;
}temp,*operator[10],*operand[10];

typedef struct node N;


int p,top1=0,top2=0;

main()
{
char exp[20];
printf("\nENter the expression :: ");
gets(exp);
for(i=0;exp[i]!='\0';i++)
{
check(exp[i]);
printf("\nThe priority value of %c is %d \n",exp[i],p);
push(exp[i]);
}

}



void check(char x)
{
p=-1;
switch(x)
{
case '*' :
p=1;
break;
case '/' :
p=1;
break;
case '+' :
p=2;
break;
case '-' :
p=2;
break;
default :
p=3;
break;

}
}

void push(char x)
{
temp=(N*)malloc(sizeof(N));
temp->info=x;
temp->l=NULL;
temp->r=NULL;
switch(p)
{
case 1 :
break;
case 2 :
break;
case 3 :
operand[top1++]=temp;
break;
}
}

Days

/*Program : Days
Programmer ::fizmhd(MEA) www.mdown.co.cc*/

#include

int main()
{
int d;
printf("Enter days\n");
scanf("%d",&d);
printf("%d years,%d months,%d days\n",d/365,(d%365)/30,(d%365)%30);
}

Closed Hashing (modular technique)

/*Program to do searching using Closed Hashing (modular technique)
Programmer ::fizmhd(MEA) www.mdown.co.cc*/
#include

int ar[10],i,g=0,key;

void insert();
void search();
void delete();
void display();

main()
{
int ch;
for(i=0;i<10;i++) //to initialise every element as '-1'
ar[i]=-1;
do
{
p1:
printf("\n\t\t\t\t\tMENU \n1.Insert \n2.Search \n3.Delete \n4.Display \n5.Exit");
scanf("%d",&ch);
switch(ch)
{
case 1: insert();
break;
case 2: search();
break;
case 3: delete();
break;
case 4: display();
break;
case 5:
break;
default:printf("\nInvalid choice entry!!!\n");
goto p1;
break;
}
}while(ch!=5);
}



void insert()
{
int item,f=0;
printf("\nEnter the element to be inserted : ");
scanf("%d",&item);
key=(item%10)-1;
if(ar[key]==-1)
{
ar[key]=item;
f=1;
}
else
{
if(key<9)
{
for(i=key+1;i<10;i++)
{
if(ar[i]==-1)
{
f=1;
ar[i]=item;
break;
}
}
}
if(f==0)
{
for(i=0;i{
if(ar[i]==-1)
{
f=1;
ar[i]=item;
break;
}
}
}
}
if(f==0)
printf("\nHashTable is Full\n");

}

void display()
{
for(i=0;i<10;i++)
if(ar[i]!=-1)
{
g=1;
break;
}
if(g==1)
{
for(i=0;i<10;i++)
{
if(ar[i]==-1)
printf("\n---");
else
printf("\n%d",ar[i]);
}
}
else
printf("\nThe HashTable is empty !!!");
printf("\n");
}

void search()
{
int item,f=0;
g=0;
printf("\nEnter the element to be searched :: ");
scanf("%d",&item);
key=(item%10)-1;
for(i=0;i<10;i++)
{
if(ar[i]!=-1)
{
g=1;
break;
}
}
if(g==1)
{
if(ar[key]==item)
{
f=1;
}
else
{
if(key<9)
{
for(i=key+1;i<10;i++)
{
if(ar[i]==item)
{
f=1;
key=i;
break;
}
}
}
if(f==0)
{
for(i=0;i{
if(ar[i]==item)
{
f=1;
key=i;
break;
}

}
}

}

if(f==1)
printf("\nThe item searched was found in the hash table at position %d !",key+1);
else
{
key=-1;
printf("\nThe item searched was not found in the hash table");
}
}
else
printf("\nHashTable is empty!!\n");
}



void delete()
{
search();
if(g!=0)
{
if(key!=-1)
{
printf("\nThe element deleted is %d ",ar[key]);
ar[key]=-1;
}
}
}

Various Base Conversions

/*Program : Various Base Conversions - Binary to Decimal, Decimal to Binary, Binary to Hexadecimal,Hexadecimal to Binary, Binary to Octal, Octal to Binary
Programmer ::fizmhd(MEA) www.mdown.co.cc*/

#include
#include
#define SIZE 20

int binary_to_decimal(int);
int decimal_to_binary(int);
void binary_to_hexa(int);
int hexa_to_binary(char []);
void binary_to_octal(int);
void octal_to_binary(int);

int main()
{
int choice=0,number=0;
char hexa[10];
do
{
printf("\n\n\tMenu\n\t1.Binary to Decimal\n\t2.Decimal to Binary\n\t3.Binary to Hexadecimal\n\t4.Hexadecimal to Binary\n\t5.Binary to Octal\n\t6.Octal to Binary\n\t7.Exit\n");
scanf("%d",&choice);
switch(choice)
{
case 1: // Binary to Decimal
printf("Enter Binary Number :\t");
scanf("%d",&number);
printf("Decimal Number :\t%d",binary_to_decimal(number));
break;
case 2: // Decimal to Binary
printf("Enter Decimal Number :\t");
scanf("%d",&number);
decimal_to_binary(number);
break;
case 3: // Binary to Hexadecimal
printf("Enter Binary Number :\t");
scanf("%d",&number);
binary_to_hexa(number);
break;
case 4: // Hexadecimal to Binary
printf("Enter Hexadecimal Number :\t");
scanf("%s",&hexa);
hexa_to_binary(hexa);
break;
case 5: // Binary to Octal
printf("Enter Binary Number :\t");
scanf("%d",&number);
binary_to_octal(number);
break;
case 6: // Octal to Binary
printf("Enter Octal Number :\t");
scanf("%d",&number);
octal_to_binary(number);
case 7: // Exit
break;
default:break;
}
}
while(choice!=7);
}
int binary_to_decimal(int num)
{
int i=0,sum=0;
while(num!=0)
{
sum=sum+(num%10)*pow(2,i++);
num/=10;
}
return sum;
}
int decimal_to_binary(int num)
{
int array[SIZE],i=0;
while(num!=0)
{
array[i++]=num%2;
num/=2;
}
printf("Binary Number :\t");
for(--i;i>=0;i--)
printf("%d",array[i]);
}
void binary_to_hexa(int num)
{
int array[SIZE],i=0;
num=binary_to_decimal(num);
if(num==0)
{
array[i++]=0;
}
while(num!=0)
{
array[i++]=num%16;
num/=16;
}
printf("\nHexadecimal No :\t");
for(--i;i>=0;i--)
{
if(array[i]>=10&&array[i]<=15)
printf("%c",array[i]+55);
else
printf("%d",array[i]);
}
}

int hexa_to_binary(char s[])
{
int a[SIZE],i,dn=0,j=0;
for(i=0;s[i]!=NULL;i++)
{
if(s[i]<=57&&s[i]>=48)
a[i]=s[i]-48;
if(s[i]>=65&&s[i]<=70)
a[i]=s[i]-55;
else
{
printf("Wrong Input");
return;
}
}
for(;--i>=0;)
{
dn+=a[i]*pow(16,j++);
}
decimal_to_binary(dn);
}

void binary_to_octal(int num)
{
int array[SIZE],i=0;
num=binary_to_decimal(num);
if(num==0)
{
array[i++]=0;
}
while(num!=0)
{
array[i++]=num%8;
num/=8;
}
printf("Octal Number :\t");
for(--i;i>=0;i--)
printf("%d",array[i]);
}

void octal_to_binary(int num)
{
int i=0,sum=0;
while(num!=0)
{
sum=sum+(num%10)*pow(8,i++);
num/=10;
}
decimal_to_binary(sum);
}

Chess Board

/*Program : Chess Board
Programmer ::fizmhd(MEA) www.mdown.co.cc*/

#include

/**********************************************************************************
A chess board has coordinates (1,1) to (8,8). A Bishop is placed in one of the squares (m,n). Assuming the board to be empty, find the number of possible moves it can make on the board.
eg:
Input: 1, 1
Output: 7
**********************************************************************************/


int main()
{
int x,y,movement=0,a,b;
printf("Enter position of bishop\n");
scanf("%d%d",&x,&y);
if(x>8||y>8)
printf("max possible co-ordinate is 8\n");
else{
a=x;
b=y;
while(x<8&&y<8) x="a;" y="b;">1)
{
x++;
y--;
movement++;
}
x=a;
y=b;
while(x>1&&y>1)
{
x--;
y--;
movement++;
}
x=a;
y=b;
while(x>1&&y<8)
{
x--;
y++;
movement++;
}
printf("no of movements possible for bishop = %d\n",movement);
}
}

Bitwise Operation

/*Program : Bitwise Operation
Programmer ::fizmhd(MEA) www.mdown.co.cc*/

#include

int main()
{
int n,i=0;
scanf("%d",&n);
while(n!=0)
{
if((1&n)!=0)
i++;
n>>1;
}
printf("%d",i);
}

BFS and DFS

/*Program : BFS and DFS
Programmer ::fizmhd(MEA) www.mdown.co.cc*/



#include
int q[20],top=-1,front=-1,rear=-1,a[20][20],vis[20],stack[20];
int delete();
void add(int item);
void bfs(int s,int n);
void dfs(int s,int n);
void push(int item);
int pop();
main()
{
int n,i,s,ch,j;
char c,dummy;
printf("ENTER THE NUMBER VERTICES ");
scanf("%d",&n);
for(i=1;i<=n;i++)
{
for(j=1;j<=n;j++)
{
printf("ENTER 1 IF %d HAS A NODE WITH %d ELSE 0 ",i,j);
scanf("%d",&a[i][j]);
}
}
printf("THE ADJACENCY MATRIX IS\n");
for(i=1;i<=n;i++)
{
for(j=1;j<=n;j++)
{
printf(" %d",a[i][j]);
}
printf("\n");
}

do
{
for(i=1;i<=n;i++)
vis[i]=0;
printf("\nMENU");
printf("\n1.B.F.S");
printf("\n2.D.F.S");
printf("\nENTER YOUR CHOICE");
scanf("%d",&ch);
printf("ENTER THE SOURCE VERTEX :");
scanf("%d",&s);

switch(ch)
{
case 1:bfs(s,n);
break;
case 2:
dfs(s,n);
break;
}
printf("DO U WANT TO CONTINUE(Y/N) ? ");
scanf("%c",&dummy);
scanf("%c",&c);
}while((c=='y')||(c=='Y'));
}
void bfs(int s,int n)
{
int p,i;
add(s);
vis[s]=1;
p=delete();
if(p!=0)
printf(" %d",p);
while(p!=0)
{
for(i=1;i<=n;i++)
if((a[p][i]!=0)&&(vis[i]==0))
{
add(i);
vis[i]=1;
}
p=delete();
if(p!=0)
printf(" %d ",p);
}
for(i=1;i<=n;i++)
if(vis[i]==0)
bfs(i,n);
}
void add(int item)
{
if(rear==19)
printf("QUEUE FULL");
else
{
if(rear==-1)
{
q[++rear]=item;
front++;
}
else
q[++rear]=item;
}
}
int delete()
{
int k;
if((front>rear)||(front==-1))
return(0);
else
{
k=q[front++];
return(k);
}
}

void dfs(int s,int n)
{
int i,k;
push(s);
vis[s]=1;
k=pop();
if(k!=0)
printf(" %d ",k);
while(k!=0)
{
for(i=1;i<=n;i++)
if((a[k][i]!=0)&&(vis[i]==0))
{
push(i);
vis[i]=1;
}
k=pop();
if(k!=0)
printf(" %d ",k);
}
for(i=1;i<=n;i++)
if(vis[i]==0)
dfs(i,n);
}
void push(int item)
{
if(top==19)
printf("Stack overflow ");
else
stack[++top]=item;
}
int pop()
{
int k;
if(top==-1)
return(0);
else
{
k=stack[top--];
return(k);
}
}

Easy Hits

EasyHits4U.com - Your Free Traffic Exchange - 1:1 Exchange Ratio, 5-Tier Referral Program. FREE Advertising!

Bottom Square