This function prints the summation of the information of each node.
//Sum Function void sum() { int sum=0; Node *tptr=start; while(tptr) { sum=sum+tptr->info; tptr=tptr->Link; } printf("\nSum is:%d",sum); }
This function prints the summation of the information of each node.
//Sum Function void sum() { int sum=0; Node *tptr=start; while(tptr) { sum=sum+tptr->info; tptr=tptr->Link; } printf("\nSum is:%d",sum); }
#include<stdio.h> #include<stdlib.h> int MAX=0;//Max elements in the queue typedef struct mynode { char info; int pri; struct mynode...
Comments