S

@Srinidhi_Rao

C program to evaluate polynomial equation

C
2 years ago
#include <stdio.h> #include <stdlib.h> #define MAXSIZE 10 void main() { int a[MAXSIZE]; int i, N, power; float x, polySum; printf("Enter the order of the polynomial\n"); /* enter order of polynomial */

C program to implement multiple queues

C
2 years ago
#include <stdio.h> #define MAX 10 int QUEUE[MAX], rearA = -1, frontA = -1, rearB = MAX, frontB = MAX; void insertA(int val) { if (rearA == rearB - 1) printf("\nOVERFLOW"); else { if (rearA == -1 && frontA == -1) {

C program to implement multi stack

C
2 years ago
#include <stdio.h> #define MAX_X 5 #define MAX_Y 5 int topx = -1; int topy = 10; /* Begin of push_x */ void push_x(int *stack) { int info;

C program to infix to prefix

C
2 years ago
#include <stdio.h> #include <string.h> // Stack precedence function int F(char symbol) { switch(symbol) { case '+': case '-': return 1; case '*':

C program implementing separate chaining(collision resolution -) in hashing

C
2 years ago
#include <stdio.h> #include <stdlib.h> #define SIZE 10 struct node { int data; struct node *next; }; // Initialize the hash table

Design and develop a C program to check whether the given matrix is sparse matrix or not

C
2 years ago
#include<stdio.h> #include<stdlib.h> int main(){ int row,col,i,j,a[10][10],count = 0; printf("Enter row"); scanf("%d",&row); printf("Enter Column"); scanf("%d",&col); printf("Enter Element of Matrix1");

C program to Implementation for Polynomial Addition using Linked List in C

C
2 years ago
#include <stdio.h> #include <stdlib.h> struct Node { int coef; int exp; struct Node* next; }; typedef struct Node Node; void insert(Node** poly, int coef, int exp) {

C program to generate cost of edges in weighted graph

C
2 years ago
#include <stdio.h> #define MAX_NODES 10 // Function to generate the cost of edges in a weighted graph void generateCost(int graph[MAX_NODES][MAX_NODES], int numNodes) { printf("Enter the cost of edges in the graph:\n"); for (int i = 0; i < numNodes; i++) {

C program to construct a binary tree from a forest

C
2 years ago
#include <stdio.h> #include <stdlib.h> // Definition for a binary tree node struct TreeNode { int val; struct TreeNode *left; struct TreeNode *right; };

Design and develop a C program to check whether the given matrix is sparse matrix or not

C
2 years ago
#include<stdio.h> #include<stdlib.h> int main(){ int row,col,i,j,a[10][10],count = 0; printf("Enter row"); scanf("%d",&row); printf("Enter Column"); scanf("%d",&col); printf("Enter Element of Matrix1"); for(i = 0; i < row; i++){

C program to implement threaded binary tree

C
2 years ago
#include <stdio.h> #include <stdlib.h> struct Node { int data; struct Node* left; struct Node* right; int isThreaded; // 1 if right pointer points to in-order successor, 0 otherwise };