C program to Demonstrate the #define pre-processor.

C Program to demonstrate #define pre-processor. Macro is a piece of text that is expanded by the pre-processor part of the compiler. This is used in to expand text before compiling. Macro definitions (#define), and conditional inclusion (#if). In many C implementations, it is a separate program invoked by the compiler as the first part …

C Program to illustrate Arithmetic operators

C Program to illustrate Airthmatic operators. This program takes an integer variable i and performs the basic arithmetic functions like Addition, Subtraction, Multiplication, Division, Unary Addition and Unary Subtraction. Read more about C Programming Language . /*********************************************************** * You can use all the programs on www.c-program-example.com * for personal and learning purposes. For permissions to …

C Program to Illustrate all data types.

C Program to Illustrate all data types.  The four different data types are assigned the corresponding values are printed. We can see that, to print a Integer value we give a %d sign, similarly for Character %c, Float %f and for Double %e.Read more about C Programming Language . /************************************************************ You can use all the …

C Program to print the values stored in identifiers.

C Program to print the values stored in identifiers. An identifier can be in lowercase or uppercase. The upper and lower case are NOT interchangeable. The above program should give you an idea that C is case sensitive. “Sum” and “sum” are different variables and so have different values. The _ (underscore) character can also …

Stack Implementation in C – Array Based with PUSH, POP, PEEK

Stack implementation in C uses an array with a top pointer that tracks the current topmost element. A stack is a LIFO (Last In, First Out) data structure — the last element pushed is the first one popped. It supports three core operations: PUSH (insert), POP (remove), and PEEK (view without removing). Stacks are used …

Singly Linked List in C – Insert, Delete, Search, and Traverse

A linked list in C is a data structure where each element (called a node) stores a value and a pointer to the next node. Unlike an array, nodes are scattered in memory — the pointers chain them together into a sequence. This makes insertion and deletion at any position O(1) once you have a …