Happy Codings - Programming Code Examples
Html Css Web Design Sample Codes CPlusPlus Programming Sample Codes JavaScript Programming Sample Codes C Programming Sample Codes CSharp Programming Sample Codes Java Programming Sample Codes Php Programming Sample Codes Visual Basic Programming Sample Codes

C Programming Code Examples

C > For Loops and While Loops Code Examples

Program to find sum of even numbers in given range

Swapping Two Numbers Without Variable - Imagine we have two number 1 and 2 stored in x and j respectively now. If we add x and j (1 + 2) and store it to x then x will become 3 and j is still 2. We subtract j (2) from new value of

Program Find the Average using Function - C code to find the average using function. We have created user defined function average() for the calculation of average. The numbers entered by user are passed to this c function

C++ Find kth Largest Element in Sequence - A Function to build max heap from the initial array by checking all non-leaf node to satisfy the condition. And build "max-heap" k times, extract the 'maximum' and store it in the end

C++ Code to List Files in Current Directory - To list and "display/print" all the files present inside the current directory in The C++, use a pointer say dir of DIR and the pointer say pdir of dirent to open and "read directory" to print

Find the Nearest Common Ancestor in The - C Program prints all the elements of Nth level in single line. Structure of binary tree node. Add node to binary tree. Height of the binary tree. Finds the nearest common ancestor. If

C Read and Write Strings gets() and puts() - String is an 'Array of characters'. In this guide, we learn how to declare strings, how to work with strings in C language and how to use the 'pre-defined' string handling functions. String

Code Find the Biggest Number in an Array - C Program to find the 'Biggest Number' in an array of numbers using recursion. C Program example printing the "Largest Number" in an unsorted array of elements 'Using Recursion'.

C++ Check whether a Vertex Cover of Size - The problem takes E edges as input and then outputs whehter vertex cover of size K of the graph exists or not. 'Vertex Cover of a Graph' is, a set of vertices S, such that for every edge