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)

Best C Programming Code for Nested Structure and array of structure (January,2021)

#include<stdio.h> struct dob{ int dd; int mm; int yy; }; struct Student { int roll; struct dob date; char name[50]; }; int main() { struct Student s[50]; int i,m; printf("\nNumber…

Continue ReadingBest C Programming Code for Nested Structure and array of structure (January,2021)

Best C Programming Code for several String related user defined functions (January,2021)

#include<stdio.h> void mstrcpy(char [],char []);//this function will copy one string into another int mstrlen(char []);// this function will find out the length of the string void mstrcat(char [],char []); //…

Continue ReadingBest C Programming Code for several String related user defined functions (January,2021)

Best C Programming code for Binary Search Tree and its several functions (December,2020)

Binary Search Tree and it's several functions In this code, I have represented Binary Search Tree in the easiest way. Firstly, I have designed the code for representing Binary Search…

Continue ReadingBest C Programming code for Binary Search Tree and its several functions (December,2020)

Best C programming code for Josephus problem (October,2020) – Circular Linked List

#include<stdio.h> #include<conio.h> typedef struct circular { int val; struct circular *next; }cir; cir *create(); void disp(cir *); void insertafter(cir *,int); cir *insertbefore(cir *,int); cir *del(cir *,int); cir *josephus(cir*,int); void main()…

Continue ReadingBest C programming code for Josephus problem (October,2020) – Circular Linked List

Best C programming code for several functions used in Binary Tree (December,2020)

#include<stdio.h> #include<conio.h> #include<malloc.h> typedef struct tree { int val; struct tree *lch; struct tree *rch; }tr; typedef struct stack { tr *node; struct stack *next; }st; void push(st **,tr *);…

Continue ReadingBest C programming code for several functions used in Binary Tree (December,2020)

Best C programming code for different functions of Linked List (October,2020)

#include<stdio.h> #include<conio.h> #include<stdlib.h> typedef struct linked { int val; struct linked *next; }lnk; lnk *create(lnk*,int); lnk *insertbefore(lnk*,int); void insertafter(lnk*,int); lnk *del(lnk*,int); void disp(lnk*); void main() { lnk *h=NULL; int v,ch;…

Continue ReadingBest C programming code for different functions of Linked List (October,2020)