C program to insert Student Records to a Sequential File

Saturday, June 9th, 2012  »  Posted By  »  Total 0 Comment

Source: Dr. G T Raju, Professor & Head, Dept. of CSE, RNSIT 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 […]

C program to implement queue operations

Tuesday, June 5th, 2012  »  Posted By  »  Total 0 Comment

Below is the C program to implement various queue operations, 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 […]

C Program which performs stack operations

Tuesday, June 5th, 2012  »  Posted By  »  Total 1 Comment

Following program performs various stack operations, 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 […]

C program for sorting a Linked List

Sunday, April 4th, 2010  »  Posted By  »  Total 1 Comment

C program for sorting a Linked List. #include<stdio.h> #include<dirent.h> #include<malloc.h> #include<string.h>   void main (int argc,char * argv[]) { DIR * directory_pointer; struct dirent* entry; struct File list { char filename[64]; struct File * new; } start,*node,* previous, * new; if((directory_pointer=opendir(argv[1]))==NULL) printf("Error opening %s\n", argv[1]); else { start.next + NULL; while (entry = readdir (directory_pointer)) […]

C++ program to calculate the factorial of a number using recursion.

Sunday, April 4th, 2010  »  Posted By  »  Total 21 Comments

Write a program to calculate the factorial of a number using recursion. #include<iostream.h> #include<conio.h> void main() { int n,fact; int rec(int); clrscr(); cout<<"Enter the number:->"; cin>>n; fact=rec(n); cout<<endl<<"Factorial Result are:: "<<fact<<endl; getch(); } rec(int x) { int f; if(x==1) return(x); else { f=x*rec(x-1); return(f); } }

C++ program to print student details using constructor and destructor

Friday, March 12th, 2010  »  Posted By  »  Total 33 Comments

CONSTRUCTOR AND DESTRUCTOR AIM: A program to print student details using constructor and destructor ALGORITHAM: 1. Start the process 2. Invoke the classes 3. Call the read() function a. Get the inputs name ,roll number and address 4. Call the display() function a. Display the name,roll number,and address of the student 5. Stop the process […]

C++ program to implement circular queue ADT using an array

Thursday, March 11th, 2010  »  Posted By  »  Total 2 Comments

/* Write a C++ program to implement circular queue ADT using an array */ #include<iostream> #include<conio.h> #include<stdlib.h> using namespace std; class cqueue { int q[5],front,rare; public: cqueue() { front=-1; rare=-1; } void push(int x) { if(front ==-1 && rare == -1) { q[++rare]=x; front=rare; return; } else if(front == (rare+1)%5 ) { cout <<" Circular […]

C++ programs to implement the Queue ADT using an array

Wednesday, March 10th, 2010  »  Posted By  »  Total 14 Comments

/* Write C++ programs to implement the Queue ADT using an array */ #include<iostream> #include<conio.h> #include<stdlib.h> using namespace std;   class queue { int queue1[5]; int rear,front; public: queue() { rear=-1; front=-1; } void insert(int x) { if(rear > 4) { cout <<"queue over flow"; front=rear=-1; return; } queue1[++rear]=x; cout <<"inserted" <<x; } void delet() […]

C++ programs to implement the Stack ADT using an array

Wednesday, March 10th, 2010  »  Posted By  »  Total 11 Comments

void push(int x)
{
if(top > 4)
{
cout <<“stack over flow”;
return;
}
stk[++top]=x;
cout <<“inserted” < }

C++ program to implement all the functions of a dictionary (ADT) using hashing

Wednesday, March 10th, 2010  »  Posted By  »  Total 10 Comments

class Dictionary
{
public:
int index;

Dictionary();
void insert(int);
void search(int);
void delete_ele(int);
};

Question and Answer
C/C++ Unix & Linux Wordpress
Source codes
C C++ Java

Free email signup

Email: