C Program to Implement Stack using Linked List

This C Program implement a stack using linked list. Stack is a type of queue that in practice is implemented as an area of memory that holds all local variables and parameters used by any function, and remembers the order in which functions are called so that function returns occur correctly. Each time a function … Read more

advertisement

C Program to Reverse a Linked List using Recursion

This C Program uses recursive function & reverses the nodes in a linked list and displays the list. A linked list is an ordered set of data elements, each containing a link to its successor. This program makes each data element to link to its predecessor. Here is the source code of the C program … Read more

advertisement

DFS Traversal of a Tree Without using Recursion in C

The following C program, using iteration, performs a Depth First Search traversal. Depth-first search (DFS) is an algorithm for traversing or searching a tree, tree structure or graph. The concept of backtracking is used in DFS. In this program we are performing DFS on a binary tree. In DFS, the deepest and univisited node is … Read more

advertisement

C Program to Reverse a Stack without Recursion

This C program, using iteration, reverses a stack content. Stack here is represented using a linked list. A linked list is an ordered set of data elements, each containing a link to its successor. Here is the source code of the C program to display a linked list in reverse. The C program is successfully … Read more

advertisement

C Program to Implement a B Tree

This C Program constructs a binary tree. Here is source code of the C Program to construct a binary tree. The C program is successfully compiled and run on a Linux system. The program output is also shown below. /* * C Program to Construct a B Tree */ /*************************** * binarytree.h ***************************/ typedef char DATA; struct node{ DATA d; struct node … Read more

advertisement

C Program to Print Alternate Nodes of a Linked List without Recursion

This C program, using iteration, displays the alternate nodes in a linked list.A linked list is an ordered set of data elements, each containing a link to its successor. Here is the source code of the C program to display a linked list in reverse. The C program is successfully compiled and run on a … Read more

advertisement

C Program to Print Alternate Nodes of a Linked List using Recursion

This C program, using recursion, displays the alternate nodes in a linked list.A linked list is an ordered set of data elements, each containing a link to its successor. Here is the source code of the C program to display a linked list in reverse. The C program is successfully compiled and run on a … Read more

advertisement

C Program for Tower of Hanoi

Problem Description Write a C program to solve the Tower of Hanoi Problem. What is the Tower of Hanoi? The Tower of Hanoi is a mathematical game or puzzle consisting of 3 rods or pegs and ‘n’ disks of varying diameters. It starts with all disks stacked on one rod in decreasing order. The objective … Read more

advertisement

C Program to Find Nth Node of Inorder Traversal

This C Program finds nth node in the inorder traversal of a tree. Here is source code of the C Program to find nth node in the inorder traversal of a tree. The C program is successfully compiled and run on a Linux system. The program output is also shown below. /* * C Program to … Read more

advertisement

C Program to Search an Element in a Linked List using Recursion

This C Program uses recursive function & search for an element in a linked list. A linked list is an ordered set of data elements, each containing a link to its successor. Here is the source code of the C program to find an element in linked list. The C Program is successfully compiled and … Read more

advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.