Our Feeds
Categories
Home
About
XploitZ
Vulnerability
Hacking
Shellcode
Buffer Overflow
Programming
CSS
C
CPP
Python
PHP
Java
HTML
Android
Video Tutorials
PlayStore*
Home
C++
Programming Language
Programming Languages Theory
Circular Queue implementation in C++
Monday, 30 June 2014
Ajith KP
Circular Queue implementation in C++
Ajith KP
June 30, 2014
No comments :
Circular Queue implementation in C++....
//Coded By AJITH KP //http://www.TerminalCoders.BlogSpot.iN #include
using namespace std; class circQ { int q[100], n, i; int ch, cnt, item, FR, RR; public: circQ() { cnt = 0; FR = RR = 0; } void read() { cout<<"Enter the limit: "; cin>>n; for(i = 0; i < n; i++) { q[i] = 0; } menu(); } int menu() { cout<<"\t\t\tMENU\n"; cout<<"\t1. Add Element\n"; cout<<"\t2. Remove Element\n"; cout<<"\t3. Display Elements\n"; cout<<"\t4. Exit\n"; while(ch!=4) { cout<<"ENTER CHOICE: "; cin>>ch; switch(ch) { case 1: addQ(); break; case 2: delQ(); break; case 3: disQ(); break; case 4: break; default: cout<<"Your choice is wrong\n"; break; } } cout<<"\nExiting...\n"; return 0; } int addQ() { if((RR+1)%n == FR) { cout<<"\nQueue is full\n"; return NULL; } cout<<"Enter Element: "; cin>>item; q[RR] = item; RR = ++RR%n; return 0; } int delQ() { if(FR == RR) { cout<<"\nQueue is empty\n"; return NULL; } item = q[FR]; cout<<"\nItem "<
Next
« Prev Post
Previous
Next Post »
Popular Posts
Easiest way to convert RGB Color Image to Gray scale Image in Java
Hello GuyZ, I would like to share Java code to convert RGB images to Gray scale images. I have seen many Java codes which converts im...
Web Application Vulnerabilities: Dawn, Detection, Exploitation and Defence Slide Show
ABSTRACT Web applications are popular software application types in which the client runs the application stored in server in his/her we...
Fist GUI Program - FASM
I hope you have read the previous posts about FASM. Else please read it here: http://terminalcoders.blogspot.in/search/label...
Digital Camera Day or Night - Python Solution
"You need to construct a feature in a Digital Camera, which will auto-detect and suggest to the photographer whether the pi...
OpenGL: Line Drawing - DDA Algorithm
Hello GuYz, DDA algorithm is another popular line drawing algorithm. Source Code #include <gl/glut.h> #include <Wind...
Beautiful Black-Green Theme for Hackers [GNOME/GTK/KALI LINUX]
If you like this theme download it from here: http://downloads.ziddu.com/download/24041123/HackerTheme.tar.gz.html ...
Histogram Equalization Algorithm and Implementation in Java
Histogram equalization is a technique used to enhance the contrast of image using the histogram of image. The histogram of image represents...
Skin Detection Algorithm - Implementation in Java
Hi GuyZ,,, This is one of the partial solution of my Mini Project. This is an implementation of skin detection algorithm in Jav...
P2P Networks
A P2P [ Peer 2 Peer ]computer network is one in which each computer in the network can act as a server or client for the other computers ...
OpenGL: Midpoint Circle Drawing Algorithm
Hello GuyZ, Midpoint circle drawing algorithm is important circle drawing algorithm. Its implementation in OpenGL C++ is bellow... ...
..:: SUPPORT US ::..
Labels
Programming Language
Programming Languages Theory
Adv. Hacking
Hacking
Vulnerability
C++
CPP
ALOGORITHM
Java
C
Python
Linux
PHP
Shellcode
Buffer Overflow
JavaFX
x64
Android
Digital Image Processing
Graphics
Image Processing
Metasploit
OpenGL
AI
FASM