Singly Linked List-Part 5
- Apurba Paul
- Aug 8, 2019
- 1 min read
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); }
Comments