factorialimport
java.awt.*;
import
java.awt.event.*;
import
javax.swing.*;
import
javax.swing.event.*;
/**
* Summary description for fac
*
*/
public
class fac extends JFrame
{
 // Variables declaration
 private JTabbedPane
jTabbedPane1;
 private JPanel co…[ More ]
Program
implements array as a stack.
#include
#include
#define
MAX 10
struct
stack
{
 int arr[MAX] ;
 int top ;
}
;
void
initstack ( struct stack * ) ;
void
push ( struct stack *, int item ) ;
int
pop ( struct stack * ) ;
void
mai…[ More ]
Program to
maintain a linked list
#include
#include
#include
/*
structure containing a data part and link part */
struct
node
{
 int data ;
 struct node * link ;
}
;
void
append ( struct node **, int ) ;
void
addatbeg ( struct node **, int )…[ More ]
 Program to
find the shortes path. */
#include
#include
#define
INF 9999
void
main( )
{
 int arr[4][4] ;
 int cost[4][4] = {
 7,
5, 0, 0,
 7,
0, 0, 2,
 0,
3, 0, 0,
 4,
0, 1, 0
 }
;
 int i, j, k, n = 4 ;
 clrscr( ) ;
…[ More ]
 Program that implements queue as a
linked list. */
#include
#include
struct
node
{
 int data ;
 struct node *link ;
}
;
struct
queue
{
 struct node *front ;
 struct node *rear ;
}
;
void
initqueue ( struct queue * ) ;
void
add…[ More ]
Program that
implements queue as an array. */
#include
#include
#define
MAX 10
void
addq ( int *, int, int *, int * ) ;
int
delq ( int *, int *, int * ) ;
void
main( )
{
 int arr[MAX] ;
 int front = -1, rear = -1, i ;
 clrscr( ) ;
…[ More ]
/* CH8PR4.C: Program to
insert and delete a node from the binary
search tree. */
#include
#include
#include
#define
TRUE 1
#define
FALSE 0
struct
btreenode
{
 struct btreenode *leftchild ;
 int data ;
 struct btr…[ More ]
/* CH7PR5.C: Program that
implements circular queue as an array. */
#include
#include
#define
MAX 10
void
addq ( int *, int, int *, int * ) ;
int
delq ( int *, int *, int * ) ;
void
display ( int * ) ;
void
main( )
{
 int ar…[ More ]
/* Program to implement a
binary search tree. */
#include
#include
#include
struct
btreenode
{
 struct btreenode *leftchild ;
 int data ;
 struct btreenode *rightchild ;
}
;
void
insert ( struct btreenode **, int ) ;
void
inorder ( struct btreen…[ More ]
Sparce.c
#include
void
upper_trangular();
void
tridiagonal();
void
low_trangular();
int
p[10];
main()
{
 int i;
 while(1)
 {
Â
 printf("\n1 upper_trangular \n2
tridigonal \n3 lower_trangular \n4 exit");
 printf("\nenter ur
choice\n");
 scanf("\n%d",…[ More ]
StackArray.C
#include
#include
#define maxstak 5
int top=-1
int stak[maxstak-1];
void push();
void pop();
void display();
main()
{
 int g;
 while(1)
 {
 printf("\n
1 : Push\n 2 : Pop\n 3 : Display \n 4 : Exit\n Enter your choice = ");
 scanf("%d",&g);…[ More ]
 FILEHANDLING.C
#include"stdio.h"
void main()
{
FILE *p,*q;
char file1[20],file2[20];
char ch;
clrscr();
printf("\nEnter the source file name to be
copied:");
gets(file1);
p=fopen(file1,"r");
if(p==NULL)
{
printf("cannot open %s",file1);
exit(0);
}
p…[ More ]
Selection Sort.C
/* CH9PR5.C: Selection sort. */
#include
#include
void main( )
{
 int
arr[5] = { 25, 17, 31, 13, 2 } ;
 int i,
j, temp ;
 clrscr(
) ;
 printf
( "Selection sort.\n" ) ;
 printf
( "\nArray before sorting:\n") ;
 for ( i
= 0 ; i <= 4 ; i++ )
 pr…[ More ]
Isertionsort.C
/* CH9PR7.C: Insertion sort. */
#include
#include
void main( )
{
 int
arr[5] = { 25, 17, 31, 13, 2 } ;
 int i,
j, k, temp ;
 clrscr(
) ;
 printf
( "Insertion sort.\n" ) ;
 printf
( "\nArray before sorting:\n") ;
 for ( i
= 0 ; i <= 4 ; i++ )
 p…[ More ]
CircularQueue.C
#include
#include
#define maxqueue 5
int queue[maxqueue];
int front = -1;
int rear = -1;
int m,n;
main()
{
Â
 while(1)
 {
Â
 printf("\n
1.Insert\n 2.Delete\n 3.Display\n 4.Exit\n");
 printf("Enter
your choice = ");
 scanf("%d",&…[ More ]
STORE-TOLL an Billing Project
Code :
#include
#include
#include
#include
#include
#include
#define NO 0
#define YES 1
#define NONE -1
//in a menu there can be three items
#define MAX_MENU 6
int x,y;
int selection;
int button,x,y;
void *p;
size_t area;…[ More ]
 "THE
SCHEDULER"
THE PROJECT IS MADE FOR THE EXECUTION OF TIME TABLES. A
COMMON PROBLEM ARISES THAT A COMMON ROOM OR A COMMON TEACHER IS SHARED BY TWO
OR MORE CLASSES. THIS PROJECT IS TO SOLVE PROBLEMS LIKE THIS.
*************************************************************************…[ More ]
 "THE
SCHEDULER"
THE PROJECT IS MADE FOR THE EXECUTION OF TIME TABLES. A
COMMON PROBLEM ARISES THAT A COMMON ROOM OR A COMMON TEACHER IS SHARED BY TWO
OR MORE CLASSES. THIS PROJECT IS TO SOLVE PROBLEMS LIKE THIS.
*****************************************************************************…[ More ]
MYSLAMBOOK.C
#include
#include
#include
#include
#include
#include
union REGS i,o;
void main()
 {
 int
driver,mode,x,y,but,z;Â
//intialitions of all variables
and
functions
 driver = DETECT;
 int
initmouse();Â // to load mouse
driver
 int resmpt…[ More ]
Class Record Retrieval Program
#include
#include
#include
#include
#include
#include
#define MAX_STUD 200
char logusr[80];
struct usrlog
{
char name[80];
struct date d;
struct time t;
};
struct user
{
 char lname[80];
 char lpassword[80];
 int …[ More ]