Best C Programming code for Circular Queue using Dynamic Memory Allocation – February,2021

#include<stdio.h> #include<conio.h> #include<stdlib.h> typedef struct circular { int val; struct circular *next; }cir; cir *createnode(cir *,int ); void enqueue(cir **,int); int dequeue(cir **); int isempty(cir *); int peek(cir *); void…

Continue ReadingBest C Programming code for Circular Queue using Dynamic Memory Allocation – February,2021

Best C Programming code for Circular Queue using Static Memory Allocation – February,2021

#include<stdio.h> #include<stdlib.h> #define max 5 typedef struct Queue { int val[max]; int rear,front; }qu; void enque(qu *,int); int deque(qu*); int peek(qu); int isempty(qu); int isfull(qu); void disp(qu); void main() {…

Continue ReadingBest C Programming code for Circular Queue using Static Memory Allocation – February,2021

Best C Programming code for representing Dynamic Memory Allocation using malloc() (February,2021)

#include<stdio.h> int main() { int *p,m,i;// printf("Enter the number of elements : "); scanf("%d",&m); p=(int *)malloc(m*sizeof(int)); printf("Enter the values : "); for(i=0;i<m;i++) { scanf("%d",(p+i));//(0x90 + 0) /// (0x90 + 1)…

Continue ReadingBest C Programming code for representing Dynamic Memory Allocation using malloc() (February,2021)

Best C Programming code for representing Dynamic Memory Allocation using calloc()(February,2021)

#include<stdio.h> int main() { int *p,m,i;// printf("Enter the number of elements : "); scanf("%d",&m); p=(int *)calloc(m,sizeof(int)); printf("Enter the values : "); for(i=0;i<m;i++) { scanf("%d",(p+i));//(0x90 + 0) /// (0x90 + 1)…

Continue ReadingBest C Programming code for representing Dynamic Memory Allocation using calloc()(February,2021)

Best C Programming code for Binary Search using pointer(February,2021)

#include<stdio.h> int binsear(int *,int,int); int bubble(int *,int); int main() { int ar[50],m,i,n,p; printf("\nEnter the number of elements : "); scanf("%d",&m); printf("\nEnter the values : "); for(i=0;i<m;i++) scanf("%d",&ar[i]); printf("\nEnter the value…

Continue ReadingBest C Programming code for Binary Search using pointer(February,2021)

Best C Programing code for Binary Search using function (February,2021)

#include<stdio.h> int binsear(int [],int,int); int main() { int ar[50],m,i,n,p; printf("\nEnter the number of elements : "); scanf("%d",&m); printf("\nEnter the values in ascending order : "); for(i=0;i<m;i++) scanf("%d",&ar[i]); printf("\nEnter the value…

Continue ReadingBest C Programing code for Binary Search using function (February,2021)

Best C Programming code for Postfix expression evaluation (January,2021)

//Infix to Postfix conversion along with Postfix evaluation #include<stdio.h> #define max 50 typedef struct stack { char ar[max]; int top; }st; typedef struct stack1 { float res[max]; int top; }st1;…

Continue ReadingBest C Programming code for Postfix expression evaluation (January,2021)

Best C Programming code for converting Infix Expression into Postfix Expression (January,2021)

//Program code for converting Infix expression into Postfix expression #include<stdio.h> #define MAX 100 typedef struct stack { char data[MAX]; int top; }stack; int getpriority(char); int isempty(stack *); int isfull(stack *);…

Continue ReadingBest C Programming code for converting Infix Expression into Postfix Expression (January,2021)

Best C Programming code for representing array using pointer(January,2021)

#include<stdio.h> int main() { int ar[10],*ptr,m,i; ptr=&ar[0]; printf("Enter the number of elements : "); scanf("%d",&m); for(i=0;i<m;i++) { scanf("%d",(ptr+i)); } printf("Values are : "); for(i=0;i<m;i++) { printf("%d,",*(ptr+i)); } }

Continue ReadingBest C Programming code for representing array using pointer(January,2021)