C program in data structure for tree
#include<stdio.h> #include<conio.h> #include<stdlib.h> struct node { int info; struct node *llink,*rlink; }*root=NULL; void create(); void node(struct node *q); void degree(struct node *q); void leaf(struct node *q); void interior(struct node *q); void child(struct node *q); int no,l,in,ch,p; void main() { int n; clrscr(); while(1) { printf("\n **menu**"); printf("\n 1.create a tree \n 2.count num of nodes"); printf("\n 3.degree of tree \n 4.leaf nodes \n 5.interior nodes"); printf("\n 6.childrens and parent \n 7.exit"); printf("\n enter your choice:-\t"); scanf("%d",&n); switch(n) { case 1 : create(); break; case 2 : node(root); printf("\n\n total nodes are:- %d",no); break; case 3 : degree(root); break; case 4 : leaf(roo...