/************************************************************
* Filename: Stack_Using_Array.c
* Description: To do stack operations using array
* Author: Sarju S
* Date: 01-Dec-2011
*************************************************************/
#include
#include
#define MAX_STACK_SIZE 100 /*maximum stack size*/
int stack[MAX_STACK_SIZE],top=-1;/* Global Declarations */
void stackFull()
{
fprintf(stderr, "Stack is full cannot...
Wednesday, November 30, 2011
Transpose of a Sparse Matrix using array
/************************************************************
* Filename: sparse_matrix.c
* Description: To find transpose of a sparse matrix using array
* Author: Sarju S
* Date: 25-Nov-2011
*************************************************************/
#define MAX_TERMS 100
#include
typedef struct{
int col;
int row;
int value;
}sparse_matrix;
sparse_matrix a[MAX_TERMS],b[MAX_TERMS];
int input_matrix[10][10];
void create_sparse(int row, int...
Polynomial Addition Using Array
/************************************************************
* Filename: pol_add_using_array.c
* Description: To add two polynomials using array
* Author: Sarju S
* Date: 24-Nov-2011
*************************************************************/
#include
#include
#define MAX_TERMS 100
typedef struct
{
float coef;
int expon;
}polynomial;
polynomial terms[MAX_TERMS];P
int avail=0;
void attach(float coefficient, int exponent)
{
/* add...