C PROGRAMMING

  • queue using linked list

    queue using linked list A queue is a linear data structure where elements are inserted from one end and deleted…

    Read More »
  • Queue program in c using array with menu

    Queue program in c using array with menu  A queue is a linear data structure where elements are inserted from…

    Read More »
  • write a c program for stack using array

    stack using array #include<stdio.h>#include<conio.h>int limit=5;//size of stackint stack[10];int top=-1;void push(int data){if(top==limit-1)printf("nOverflow");else{top++;stack[top]=data;printf("n%d pushed into Stackn",data);}}int pop(){ int d;if(top==-1)printf("nUnderflow");else{d= stack[top];stack[top]=0;top--;return d;}}int peek(){…

    Read More »
  • infix to postfix and infix to prefix conversion

    infix to postfix and infix to prefix conversion #include<stdio.h>#include<conio.h>#include<stdlib.h>#include<string.h>struct stack{char data;struct stack *link;};struct stack *top=NULL;void push(char c){ struct stack *temp;…

    Read More »
  • Tower of Hanoi

    Tower of Hanoi   #include <stdio.h>void move(int n,char source, char target, char spare){ if (n==1) printf("Move from %c to %cn",source,target);…

    Read More »
  • linear search on array

    linear search #include<stdio.h>#include<conio.h>main(){ int array[20],size,search,loop; printf("Enter the size of arrayn"); scanf("%d",&size); printf("Enter %d elements of arrayn",size); for(loop=0;loop<size;loop++) { scanf("%d",&array[loop]); }…

    Read More »
Back to top button